{-# 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.WellArchitected.Types.LensUpgradeSummary
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.WellArchitected.Types.LensUpgradeSummary where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Lens upgrade summary return object.
--
-- /See:/ 'newLensUpgradeSummary' smart constructor.
data LensUpgradeSummary = LensUpgradeSummary'
  { LensUpgradeSummary -> Maybe Text
lensAlias :: Prelude.Maybe Prelude.Text,
    -- | The latest version of the lens.
    LensUpgradeSummary -> Maybe Text
latestLensVersion :: Prelude.Maybe Prelude.Text,
    -- | The current version of the lens.
    LensUpgradeSummary -> Maybe Text
currentLensVersion :: Prelude.Maybe Prelude.Text,
    LensUpgradeSummary -> Maybe Text
workloadId :: Prelude.Maybe Prelude.Text,
    LensUpgradeSummary -> Maybe Text
workloadName :: Prelude.Maybe Prelude.Text
  }
  deriving (LensUpgradeSummary -> LensUpgradeSummary -> Bool
(LensUpgradeSummary -> LensUpgradeSummary -> Bool)
-> (LensUpgradeSummary -> LensUpgradeSummary -> Bool)
-> Eq LensUpgradeSummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: LensUpgradeSummary -> LensUpgradeSummary -> Bool
$c/= :: LensUpgradeSummary -> LensUpgradeSummary -> Bool
== :: LensUpgradeSummary -> LensUpgradeSummary -> Bool
$c== :: LensUpgradeSummary -> LensUpgradeSummary -> Bool
Prelude.Eq, ReadPrec [LensUpgradeSummary]
ReadPrec LensUpgradeSummary
Int -> ReadS LensUpgradeSummary
ReadS [LensUpgradeSummary]
(Int -> ReadS LensUpgradeSummary)
-> ReadS [LensUpgradeSummary]
-> ReadPrec LensUpgradeSummary
-> ReadPrec [LensUpgradeSummary]
-> Read LensUpgradeSummary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [LensUpgradeSummary]
$creadListPrec :: ReadPrec [LensUpgradeSummary]
readPrec :: ReadPrec LensUpgradeSummary
$creadPrec :: ReadPrec LensUpgradeSummary
readList :: ReadS [LensUpgradeSummary]
$creadList :: ReadS [LensUpgradeSummary]
readsPrec :: Int -> ReadS LensUpgradeSummary
$creadsPrec :: Int -> ReadS LensUpgradeSummary
Prelude.Read, Int -> LensUpgradeSummary -> ShowS
[LensUpgradeSummary] -> ShowS
LensUpgradeSummary -> String
(Int -> LensUpgradeSummary -> ShowS)
-> (LensUpgradeSummary -> String)
-> ([LensUpgradeSummary] -> ShowS)
-> Show LensUpgradeSummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [LensUpgradeSummary] -> ShowS
$cshowList :: [LensUpgradeSummary] -> ShowS
show :: LensUpgradeSummary -> String
$cshow :: LensUpgradeSummary -> String
showsPrec :: Int -> LensUpgradeSummary -> ShowS
$cshowsPrec :: Int -> LensUpgradeSummary -> ShowS
Prelude.Show, (forall x. LensUpgradeSummary -> Rep LensUpgradeSummary x)
-> (forall x. Rep LensUpgradeSummary x -> LensUpgradeSummary)
-> Generic LensUpgradeSummary
forall x. Rep LensUpgradeSummary x -> LensUpgradeSummary
forall x. LensUpgradeSummary -> Rep LensUpgradeSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep LensUpgradeSummary x -> LensUpgradeSummary
$cfrom :: forall x. LensUpgradeSummary -> Rep LensUpgradeSummary x
Prelude.Generic)

-- |
-- Create a value of 'LensUpgradeSummary' 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:
--
-- 'lensAlias', 'lensUpgradeSummary_lensAlias' - Undocumented member.
--
-- 'latestLensVersion', 'lensUpgradeSummary_latestLensVersion' - The latest version of the lens.
--
-- 'currentLensVersion', 'lensUpgradeSummary_currentLensVersion' - The current version of the lens.
--
-- 'workloadId', 'lensUpgradeSummary_workloadId' - Undocumented member.
--
-- 'workloadName', 'lensUpgradeSummary_workloadName' - Undocumented member.
newLensUpgradeSummary ::
  LensUpgradeSummary
newLensUpgradeSummary :: LensUpgradeSummary
newLensUpgradeSummary =
  LensUpgradeSummary' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> LensUpgradeSummary
LensUpgradeSummary'
    { $sel:lensAlias:LensUpgradeSummary' :: Maybe Text
lensAlias = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:latestLensVersion:LensUpgradeSummary' :: Maybe Text
latestLensVersion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:currentLensVersion:LensUpgradeSummary' :: Maybe Text
currentLensVersion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:workloadId:LensUpgradeSummary' :: Maybe Text
workloadId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:workloadName:LensUpgradeSummary' :: Maybe Text
workloadName = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | Undocumented member.
lensUpgradeSummary_lensAlias :: Lens.Lens' LensUpgradeSummary (Prelude.Maybe Prelude.Text)
lensUpgradeSummary_lensAlias :: (Maybe Text -> f (Maybe Text))
-> LensUpgradeSummary -> f LensUpgradeSummary
lensUpgradeSummary_lensAlias = (LensUpgradeSummary -> Maybe Text)
-> (LensUpgradeSummary -> Maybe Text -> LensUpgradeSummary)
-> Lens
     LensUpgradeSummary LensUpgradeSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LensUpgradeSummary' {Maybe Text
lensAlias :: Maybe Text
$sel:lensAlias:LensUpgradeSummary' :: LensUpgradeSummary -> Maybe Text
lensAlias} -> Maybe Text
lensAlias) (\s :: LensUpgradeSummary
s@LensUpgradeSummary' {} Maybe Text
a -> LensUpgradeSummary
s {$sel:lensAlias:LensUpgradeSummary' :: Maybe Text
lensAlias = Maybe Text
a} :: LensUpgradeSummary)

-- | The latest version of the lens.
lensUpgradeSummary_latestLensVersion :: Lens.Lens' LensUpgradeSummary (Prelude.Maybe Prelude.Text)
lensUpgradeSummary_latestLensVersion :: (Maybe Text -> f (Maybe Text))
-> LensUpgradeSummary -> f LensUpgradeSummary
lensUpgradeSummary_latestLensVersion = (LensUpgradeSummary -> Maybe Text)
-> (LensUpgradeSummary -> Maybe Text -> LensUpgradeSummary)
-> Lens
     LensUpgradeSummary LensUpgradeSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LensUpgradeSummary' {Maybe Text
latestLensVersion :: Maybe Text
$sel:latestLensVersion:LensUpgradeSummary' :: LensUpgradeSummary -> Maybe Text
latestLensVersion} -> Maybe Text
latestLensVersion) (\s :: LensUpgradeSummary
s@LensUpgradeSummary' {} Maybe Text
a -> LensUpgradeSummary
s {$sel:latestLensVersion:LensUpgradeSummary' :: Maybe Text
latestLensVersion = Maybe Text
a} :: LensUpgradeSummary)

-- | The current version of the lens.
lensUpgradeSummary_currentLensVersion :: Lens.Lens' LensUpgradeSummary (Prelude.Maybe Prelude.Text)
lensUpgradeSummary_currentLensVersion :: (Maybe Text -> f (Maybe Text))
-> LensUpgradeSummary -> f LensUpgradeSummary
lensUpgradeSummary_currentLensVersion = (LensUpgradeSummary -> Maybe Text)
-> (LensUpgradeSummary -> Maybe Text -> LensUpgradeSummary)
-> Lens
     LensUpgradeSummary LensUpgradeSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LensUpgradeSummary' {Maybe Text
currentLensVersion :: Maybe Text
$sel:currentLensVersion:LensUpgradeSummary' :: LensUpgradeSummary -> Maybe Text
currentLensVersion} -> Maybe Text
currentLensVersion) (\s :: LensUpgradeSummary
s@LensUpgradeSummary' {} Maybe Text
a -> LensUpgradeSummary
s {$sel:currentLensVersion:LensUpgradeSummary' :: Maybe Text
currentLensVersion = Maybe Text
a} :: LensUpgradeSummary)

-- | Undocumented member.
lensUpgradeSummary_workloadId :: Lens.Lens' LensUpgradeSummary (Prelude.Maybe Prelude.Text)
lensUpgradeSummary_workloadId :: (Maybe Text -> f (Maybe Text))
-> LensUpgradeSummary -> f LensUpgradeSummary
lensUpgradeSummary_workloadId = (LensUpgradeSummary -> Maybe Text)
-> (LensUpgradeSummary -> Maybe Text -> LensUpgradeSummary)
-> Lens
     LensUpgradeSummary LensUpgradeSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LensUpgradeSummary' {Maybe Text
workloadId :: Maybe Text
$sel:workloadId:LensUpgradeSummary' :: LensUpgradeSummary -> Maybe Text
workloadId} -> Maybe Text
workloadId) (\s :: LensUpgradeSummary
s@LensUpgradeSummary' {} Maybe Text
a -> LensUpgradeSummary
s {$sel:workloadId:LensUpgradeSummary' :: Maybe Text
workloadId = Maybe Text
a} :: LensUpgradeSummary)

-- | Undocumented member.
lensUpgradeSummary_workloadName :: Lens.Lens' LensUpgradeSummary (Prelude.Maybe Prelude.Text)
lensUpgradeSummary_workloadName :: (Maybe Text -> f (Maybe Text))
-> LensUpgradeSummary -> f LensUpgradeSummary
lensUpgradeSummary_workloadName = (LensUpgradeSummary -> Maybe Text)
-> (LensUpgradeSummary -> Maybe Text -> LensUpgradeSummary)
-> Lens
     LensUpgradeSummary LensUpgradeSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LensUpgradeSummary' {Maybe Text
workloadName :: Maybe Text
$sel:workloadName:LensUpgradeSummary' :: LensUpgradeSummary -> Maybe Text
workloadName} -> Maybe Text
workloadName) (\s :: LensUpgradeSummary
s@LensUpgradeSummary' {} Maybe Text
a -> LensUpgradeSummary
s {$sel:workloadName:LensUpgradeSummary' :: Maybe Text
workloadName = Maybe Text
a} :: LensUpgradeSummary)

instance Core.FromJSON LensUpgradeSummary where
  parseJSON :: Value -> Parser LensUpgradeSummary
parseJSON =
    String
-> (Object -> Parser LensUpgradeSummary)
-> Value
-> Parser LensUpgradeSummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"LensUpgradeSummary"
      ( \Object
x ->
          Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> LensUpgradeSummary
LensUpgradeSummary'
            (Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> LensUpgradeSummary)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text -> Maybe Text -> Maybe Text -> LensUpgradeSummary)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"LensAlias")
            Parser
  (Maybe Text
   -> Maybe Text -> Maybe Text -> Maybe Text -> LensUpgradeSummary)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text -> Maybe Text -> Maybe Text -> LensUpgradeSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"LatestLensVersion")
            Parser
  (Maybe Text -> Maybe Text -> Maybe Text -> LensUpgradeSummary)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> LensUpgradeSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CurrentLensVersion")
            Parser (Maybe Text -> Maybe Text -> LensUpgradeSummary)
-> Parser (Maybe Text) -> Parser (Maybe Text -> LensUpgradeSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"WorkloadId")
            Parser (Maybe Text -> LensUpgradeSummary)
-> Parser (Maybe Text) -> Parser LensUpgradeSummary
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"WorkloadName")
      )

instance Prelude.Hashable LensUpgradeSummary

instance Prelude.NFData LensUpgradeSummary