{-# 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.ElasticInference.Types.ElasticInferenceAcceleratorHealth
-- 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.ElasticInference.Types.ElasticInferenceAcceleratorHealth where

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

-- | The health details of an Elastic Inference Accelerator.
--
-- /See:/ 'newElasticInferenceAcceleratorHealth' smart constructor.
data ElasticInferenceAcceleratorHealth = ElasticInferenceAcceleratorHealth'
  { -- | The health status of the Elastic Inference Accelerator.
    ElasticInferenceAcceleratorHealth -> Maybe Text
status :: Prelude.Maybe Prelude.Text
  }
  deriving (ElasticInferenceAcceleratorHealth
-> ElasticInferenceAcceleratorHealth -> Bool
(ElasticInferenceAcceleratorHealth
 -> ElasticInferenceAcceleratorHealth -> Bool)
-> (ElasticInferenceAcceleratorHealth
    -> ElasticInferenceAcceleratorHealth -> Bool)
-> Eq ElasticInferenceAcceleratorHealth
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ElasticInferenceAcceleratorHealth
-> ElasticInferenceAcceleratorHealth -> Bool
$c/= :: ElasticInferenceAcceleratorHealth
-> ElasticInferenceAcceleratorHealth -> Bool
== :: ElasticInferenceAcceleratorHealth
-> ElasticInferenceAcceleratorHealth -> Bool
$c== :: ElasticInferenceAcceleratorHealth
-> ElasticInferenceAcceleratorHealth -> Bool
Prelude.Eq, ReadPrec [ElasticInferenceAcceleratorHealth]
ReadPrec ElasticInferenceAcceleratorHealth
Int -> ReadS ElasticInferenceAcceleratorHealth
ReadS [ElasticInferenceAcceleratorHealth]
(Int -> ReadS ElasticInferenceAcceleratorHealth)
-> ReadS [ElasticInferenceAcceleratorHealth]
-> ReadPrec ElasticInferenceAcceleratorHealth
-> ReadPrec [ElasticInferenceAcceleratorHealth]
-> Read ElasticInferenceAcceleratorHealth
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ElasticInferenceAcceleratorHealth]
$creadListPrec :: ReadPrec [ElasticInferenceAcceleratorHealth]
readPrec :: ReadPrec ElasticInferenceAcceleratorHealth
$creadPrec :: ReadPrec ElasticInferenceAcceleratorHealth
readList :: ReadS [ElasticInferenceAcceleratorHealth]
$creadList :: ReadS [ElasticInferenceAcceleratorHealth]
readsPrec :: Int -> ReadS ElasticInferenceAcceleratorHealth
$creadsPrec :: Int -> ReadS ElasticInferenceAcceleratorHealth
Prelude.Read, Int -> ElasticInferenceAcceleratorHealth -> ShowS
[ElasticInferenceAcceleratorHealth] -> ShowS
ElasticInferenceAcceleratorHealth -> String
(Int -> ElasticInferenceAcceleratorHealth -> ShowS)
-> (ElasticInferenceAcceleratorHealth -> String)
-> ([ElasticInferenceAcceleratorHealth] -> ShowS)
-> Show ElasticInferenceAcceleratorHealth
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ElasticInferenceAcceleratorHealth] -> ShowS
$cshowList :: [ElasticInferenceAcceleratorHealth] -> ShowS
show :: ElasticInferenceAcceleratorHealth -> String
$cshow :: ElasticInferenceAcceleratorHealth -> String
showsPrec :: Int -> ElasticInferenceAcceleratorHealth -> ShowS
$cshowsPrec :: Int -> ElasticInferenceAcceleratorHealth -> ShowS
Prelude.Show, (forall x.
 ElasticInferenceAcceleratorHealth
 -> Rep ElasticInferenceAcceleratorHealth x)
-> (forall x.
    Rep ElasticInferenceAcceleratorHealth x
    -> ElasticInferenceAcceleratorHealth)
-> Generic ElasticInferenceAcceleratorHealth
forall x.
Rep ElasticInferenceAcceleratorHealth x
-> ElasticInferenceAcceleratorHealth
forall x.
ElasticInferenceAcceleratorHealth
-> Rep ElasticInferenceAcceleratorHealth x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ElasticInferenceAcceleratorHealth x
-> ElasticInferenceAcceleratorHealth
$cfrom :: forall x.
ElasticInferenceAcceleratorHealth
-> Rep ElasticInferenceAcceleratorHealth x
Prelude.Generic)

-- |
-- Create a value of 'ElasticInferenceAcceleratorHealth' 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:
--
-- 'status', 'elasticInferenceAcceleratorHealth_status' - The health status of the Elastic Inference Accelerator.
newElasticInferenceAcceleratorHealth ::
  ElasticInferenceAcceleratorHealth
newElasticInferenceAcceleratorHealth :: ElasticInferenceAcceleratorHealth
newElasticInferenceAcceleratorHealth =
  ElasticInferenceAcceleratorHealth' :: Maybe Text -> ElasticInferenceAcceleratorHealth
ElasticInferenceAcceleratorHealth'
    { $sel:status:ElasticInferenceAcceleratorHealth' :: Maybe Text
status =
        Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | The health status of the Elastic Inference Accelerator.
elasticInferenceAcceleratorHealth_status :: Lens.Lens' ElasticInferenceAcceleratorHealth (Prelude.Maybe Prelude.Text)
elasticInferenceAcceleratorHealth_status :: (Maybe Text -> f (Maybe Text))
-> ElasticInferenceAcceleratorHealth
-> f ElasticInferenceAcceleratorHealth
elasticInferenceAcceleratorHealth_status = (ElasticInferenceAcceleratorHealth -> Maybe Text)
-> (ElasticInferenceAcceleratorHealth
    -> Maybe Text -> ElasticInferenceAcceleratorHealth)
-> Lens
     ElasticInferenceAcceleratorHealth
     ElasticInferenceAcceleratorHealth
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ElasticInferenceAcceleratorHealth' {Maybe Text
status :: Maybe Text
$sel:status:ElasticInferenceAcceleratorHealth' :: ElasticInferenceAcceleratorHealth -> Maybe Text
status} -> Maybe Text
status) (\s :: ElasticInferenceAcceleratorHealth
s@ElasticInferenceAcceleratorHealth' {} Maybe Text
a -> ElasticInferenceAcceleratorHealth
s {$sel:status:ElasticInferenceAcceleratorHealth' :: Maybe Text
status = Maybe Text
a} :: ElasticInferenceAcceleratorHealth)

instance
  Core.FromJSON
    ElasticInferenceAcceleratorHealth
  where
  parseJSON :: Value -> Parser ElasticInferenceAcceleratorHealth
parseJSON =
    String
-> (Object -> Parser ElasticInferenceAcceleratorHealth)
-> Value
-> Parser ElasticInferenceAcceleratorHealth
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"ElasticInferenceAcceleratorHealth"
      ( \Object
x ->
          Maybe Text -> ElasticInferenceAcceleratorHealth
ElasticInferenceAcceleratorHealth'
            (Maybe Text -> ElasticInferenceAcceleratorHealth)
-> Parser (Maybe Text) -> Parser ElasticInferenceAcceleratorHealth
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
"status")
      )

instance
  Prelude.Hashable
    ElasticInferenceAcceleratorHealth

instance
  Prelude.NFData
    ElasticInferenceAcceleratorHealth