{-# 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.ResilienceHub.Types.AppVersionSummary
-- 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.ResilienceHub.Types.AppVersionSummary 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

-- | The version of the application.
--
-- /See:/ 'newAppVersionSummary' smart constructor.
data AppVersionSummary = AppVersionSummary'
  { -- | The version of the application.
    AppVersionSummary -> Text
appVersion :: Prelude.Text
  }
  deriving (AppVersionSummary -> AppVersionSummary -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AppVersionSummary -> AppVersionSummary -> Bool
$c/= :: AppVersionSummary -> AppVersionSummary -> Bool
== :: AppVersionSummary -> AppVersionSummary -> Bool
$c== :: AppVersionSummary -> AppVersionSummary -> Bool
Prelude.Eq, ReadPrec [AppVersionSummary]
ReadPrec AppVersionSummary
Int -> ReadS AppVersionSummary
ReadS [AppVersionSummary]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AppVersionSummary]
$creadListPrec :: ReadPrec [AppVersionSummary]
readPrec :: ReadPrec AppVersionSummary
$creadPrec :: ReadPrec AppVersionSummary
readList :: ReadS [AppVersionSummary]
$creadList :: ReadS [AppVersionSummary]
readsPrec :: Int -> ReadS AppVersionSummary
$creadsPrec :: Int -> ReadS AppVersionSummary
Prelude.Read, Int -> AppVersionSummary -> ShowS
[AppVersionSummary] -> ShowS
AppVersionSummary -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AppVersionSummary] -> ShowS
$cshowList :: [AppVersionSummary] -> ShowS
show :: AppVersionSummary -> String
$cshow :: AppVersionSummary -> String
showsPrec :: Int -> AppVersionSummary -> ShowS
$cshowsPrec :: Int -> AppVersionSummary -> ShowS
Prelude.Show, forall x. Rep AppVersionSummary x -> AppVersionSummary
forall x. AppVersionSummary -> Rep AppVersionSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep AppVersionSummary x -> AppVersionSummary
$cfrom :: forall x. AppVersionSummary -> Rep AppVersionSummary x
Prelude.Generic)

-- |
-- Create a value of 'AppVersionSummary' 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:
--
-- 'appVersion', 'appVersionSummary_appVersion' - The version of the application.
newAppVersionSummary ::
  -- | 'appVersion'
  Prelude.Text ->
  AppVersionSummary
newAppVersionSummary :: Text -> AppVersionSummary
newAppVersionSummary Text
pAppVersion_ =
  AppVersionSummary' {$sel:appVersion:AppVersionSummary' :: Text
appVersion = Text
pAppVersion_}

-- | The version of the application.
appVersionSummary_appVersion :: Lens.Lens' AppVersionSummary Prelude.Text
appVersionSummary_appVersion :: Lens' AppVersionSummary Text
appVersionSummary_appVersion = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AppVersionSummary' {Text
appVersion :: Text
$sel:appVersion:AppVersionSummary' :: AppVersionSummary -> Text
appVersion} -> Text
appVersion) (\s :: AppVersionSummary
s@AppVersionSummary' {} Text
a -> AppVersionSummary
s {$sel:appVersion:AppVersionSummary' :: Text
appVersion = Text
a} :: AppVersionSummary)

instance Data.FromJSON AppVersionSummary where
  parseJSON :: Value -> Parser AppVersionSummary
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"AppVersionSummary"
      ( \Object
x ->
          Text -> AppVersionSummary
AppVersionSummary'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"appVersion")
      )

instance Prelude.Hashable AppVersionSummary where
  hashWithSalt :: Int -> AppVersionSummary -> Int
hashWithSalt Int
_salt AppVersionSummary' {Text
appVersion :: Text
$sel:appVersion:AppVersionSummary' :: AppVersionSummary -> Text
..} =
    Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
appVersion

instance Prelude.NFData AppVersionSummary where
  rnf :: AppVersionSummary -> ()
rnf AppVersionSummary' {Text
appVersion :: Text
$sel:appVersion:AppVersionSummary' :: AppVersionSummary -> Text
..} = forall a. NFData a => a -> ()
Prelude.rnf Text
appVersion