{-# 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.ElasticInference.Types.ElasticInferenceAccelerator where
import qualified Amazonka.Core as Core
import Amazonka.ElasticInference.Types.ElasticInferenceAcceleratorHealth
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data ElasticInferenceAccelerator = ElasticInferenceAccelerator'
{
ElasticInferenceAccelerator -> Maybe Text
acceleratorType :: Prelude.Maybe Prelude.Text,
ElasticInferenceAccelerator -> Maybe Text
acceleratorId :: Prelude.Maybe Prelude.Text,
ElasticInferenceAccelerator -> Maybe Text
attachedResource :: Prelude.Maybe Prelude.Text,
ElasticInferenceAccelerator
-> Maybe ElasticInferenceAcceleratorHealth
acceleratorHealth :: Prelude.Maybe ElasticInferenceAcceleratorHealth,
ElasticInferenceAccelerator -> Maybe Text
availabilityZone :: Prelude.Maybe Prelude.Text
}
deriving (ElasticInferenceAccelerator -> ElasticInferenceAccelerator -> Bool
(ElasticInferenceAccelerator
-> ElasticInferenceAccelerator -> Bool)
-> (ElasticInferenceAccelerator
-> ElasticInferenceAccelerator -> Bool)
-> Eq ElasticInferenceAccelerator
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ElasticInferenceAccelerator -> ElasticInferenceAccelerator -> Bool
$c/= :: ElasticInferenceAccelerator -> ElasticInferenceAccelerator -> Bool
== :: ElasticInferenceAccelerator -> ElasticInferenceAccelerator -> Bool
$c== :: ElasticInferenceAccelerator -> ElasticInferenceAccelerator -> Bool
Prelude.Eq, ReadPrec [ElasticInferenceAccelerator]
ReadPrec ElasticInferenceAccelerator
Int -> ReadS ElasticInferenceAccelerator
ReadS [ElasticInferenceAccelerator]
(Int -> ReadS ElasticInferenceAccelerator)
-> ReadS [ElasticInferenceAccelerator]
-> ReadPrec ElasticInferenceAccelerator
-> ReadPrec [ElasticInferenceAccelerator]
-> Read ElasticInferenceAccelerator
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ElasticInferenceAccelerator]
$creadListPrec :: ReadPrec [ElasticInferenceAccelerator]
readPrec :: ReadPrec ElasticInferenceAccelerator
$creadPrec :: ReadPrec ElasticInferenceAccelerator
readList :: ReadS [ElasticInferenceAccelerator]
$creadList :: ReadS [ElasticInferenceAccelerator]
readsPrec :: Int -> ReadS ElasticInferenceAccelerator
$creadsPrec :: Int -> ReadS ElasticInferenceAccelerator
Prelude.Read, Int -> ElasticInferenceAccelerator -> ShowS
[ElasticInferenceAccelerator] -> ShowS
ElasticInferenceAccelerator -> String
(Int -> ElasticInferenceAccelerator -> ShowS)
-> (ElasticInferenceAccelerator -> String)
-> ([ElasticInferenceAccelerator] -> ShowS)
-> Show ElasticInferenceAccelerator
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ElasticInferenceAccelerator] -> ShowS
$cshowList :: [ElasticInferenceAccelerator] -> ShowS
show :: ElasticInferenceAccelerator -> String
$cshow :: ElasticInferenceAccelerator -> String
showsPrec :: Int -> ElasticInferenceAccelerator -> ShowS
$cshowsPrec :: Int -> ElasticInferenceAccelerator -> ShowS
Prelude.Show, (forall x.
ElasticInferenceAccelerator -> Rep ElasticInferenceAccelerator x)
-> (forall x.
Rep ElasticInferenceAccelerator x -> ElasticInferenceAccelerator)
-> Generic ElasticInferenceAccelerator
forall x.
Rep ElasticInferenceAccelerator x -> ElasticInferenceAccelerator
forall x.
ElasticInferenceAccelerator -> Rep ElasticInferenceAccelerator x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ElasticInferenceAccelerator x -> ElasticInferenceAccelerator
$cfrom :: forall x.
ElasticInferenceAccelerator -> Rep ElasticInferenceAccelerator x
Prelude.Generic)
newElasticInferenceAccelerator ::
ElasticInferenceAccelerator
newElasticInferenceAccelerator :: ElasticInferenceAccelerator
newElasticInferenceAccelerator =
ElasticInferenceAccelerator' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ElasticInferenceAcceleratorHealth
-> Maybe Text
-> ElasticInferenceAccelerator
ElasticInferenceAccelerator'
{ $sel:acceleratorType:ElasticInferenceAccelerator' :: Maybe Text
acceleratorType =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:acceleratorId:ElasticInferenceAccelerator' :: Maybe Text
acceleratorId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:attachedResource:ElasticInferenceAccelerator' :: Maybe Text
attachedResource = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:acceleratorHealth:ElasticInferenceAccelerator' :: Maybe ElasticInferenceAcceleratorHealth
acceleratorHealth = Maybe ElasticInferenceAcceleratorHealth
forall a. Maybe a
Prelude.Nothing,
$sel:availabilityZone:ElasticInferenceAccelerator' :: Maybe Text
availabilityZone = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
elasticInferenceAccelerator_acceleratorType :: Lens.Lens' ElasticInferenceAccelerator (Prelude.Maybe Prelude.Text)
elasticInferenceAccelerator_acceleratorType :: (Maybe Text -> f (Maybe Text))
-> ElasticInferenceAccelerator -> f ElasticInferenceAccelerator
elasticInferenceAccelerator_acceleratorType = (ElasticInferenceAccelerator -> Maybe Text)
-> (ElasticInferenceAccelerator
-> Maybe Text -> ElasticInferenceAccelerator)
-> Lens
ElasticInferenceAccelerator
ElasticInferenceAccelerator
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ElasticInferenceAccelerator' {Maybe Text
acceleratorType :: Maybe Text
$sel:acceleratorType:ElasticInferenceAccelerator' :: ElasticInferenceAccelerator -> Maybe Text
acceleratorType} -> Maybe Text
acceleratorType) (\s :: ElasticInferenceAccelerator
s@ElasticInferenceAccelerator' {} Maybe Text
a -> ElasticInferenceAccelerator
s {$sel:acceleratorType:ElasticInferenceAccelerator' :: Maybe Text
acceleratorType = Maybe Text
a} :: ElasticInferenceAccelerator)
elasticInferenceAccelerator_acceleratorId :: Lens.Lens' ElasticInferenceAccelerator (Prelude.Maybe Prelude.Text)
elasticInferenceAccelerator_acceleratorId :: (Maybe Text -> f (Maybe Text))
-> ElasticInferenceAccelerator -> f ElasticInferenceAccelerator
elasticInferenceAccelerator_acceleratorId = (ElasticInferenceAccelerator -> Maybe Text)
-> (ElasticInferenceAccelerator
-> Maybe Text -> ElasticInferenceAccelerator)
-> Lens
ElasticInferenceAccelerator
ElasticInferenceAccelerator
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ElasticInferenceAccelerator' {Maybe Text
acceleratorId :: Maybe Text
$sel:acceleratorId:ElasticInferenceAccelerator' :: ElasticInferenceAccelerator -> Maybe Text
acceleratorId} -> Maybe Text
acceleratorId) (\s :: ElasticInferenceAccelerator
s@ElasticInferenceAccelerator' {} Maybe Text
a -> ElasticInferenceAccelerator
s {$sel:acceleratorId:ElasticInferenceAccelerator' :: Maybe Text
acceleratorId = Maybe Text
a} :: ElasticInferenceAccelerator)
elasticInferenceAccelerator_attachedResource :: Lens.Lens' ElasticInferenceAccelerator (Prelude.Maybe Prelude.Text)
elasticInferenceAccelerator_attachedResource :: (Maybe Text -> f (Maybe Text))
-> ElasticInferenceAccelerator -> f ElasticInferenceAccelerator
elasticInferenceAccelerator_attachedResource = (ElasticInferenceAccelerator -> Maybe Text)
-> (ElasticInferenceAccelerator
-> Maybe Text -> ElasticInferenceAccelerator)
-> Lens
ElasticInferenceAccelerator
ElasticInferenceAccelerator
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ElasticInferenceAccelerator' {Maybe Text
attachedResource :: Maybe Text
$sel:attachedResource:ElasticInferenceAccelerator' :: ElasticInferenceAccelerator -> Maybe Text
attachedResource} -> Maybe Text
attachedResource) (\s :: ElasticInferenceAccelerator
s@ElasticInferenceAccelerator' {} Maybe Text
a -> ElasticInferenceAccelerator
s {$sel:attachedResource:ElasticInferenceAccelerator' :: Maybe Text
attachedResource = Maybe Text
a} :: ElasticInferenceAccelerator)
elasticInferenceAccelerator_acceleratorHealth :: Lens.Lens' ElasticInferenceAccelerator (Prelude.Maybe ElasticInferenceAcceleratorHealth)
elasticInferenceAccelerator_acceleratorHealth :: (Maybe ElasticInferenceAcceleratorHealth
-> f (Maybe ElasticInferenceAcceleratorHealth))
-> ElasticInferenceAccelerator -> f ElasticInferenceAccelerator
elasticInferenceAccelerator_acceleratorHealth = (ElasticInferenceAccelerator
-> Maybe ElasticInferenceAcceleratorHealth)
-> (ElasticInferenceAccelerator
-> Maybe ElasticInferenceAcceleratorHealth
-> ElasticInferenceAccelerator)
-> Lens
ElasticInferenceAccelerator
ElasticInferenceAccelerator
(Maybe ElasticInferenceAcceleratorHealth)
(Maybe ElasticInferenceAcceleratorHealth)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ElasticInferenceAccelerator' {Maybe ElasticInferenceAcceleratorHealth
acceleratorHealth :: Maybe ElasticInferenceAcceleratorHealth
$sel:acceleratorHealth:ElasticInferenceAccelerator' :: ElasticInferenceAccelerator
-> Maybe ElasticInferenceAcceleratorHealth
acceleratorHealth} -> Maybe ElasticInferenceAcceleratorHealth
acceleratorHealth) (\s :: ElasticInferenceAccelerator
s@ElasticInferenceAccelerator' {} Maybe ElasticInferenceAcceleratorHealth
a -> ElasticInferenceAccelerator
s {$sel:acceleratorHealth:ElasticInferenceAccelerator' :: Maybe ElasticInferenceAcceleratorHealth
acceleratorHealth = Maybe ElasticInferenceAcceleratorHealth
a} :: ElasticInferenceAccelerator)
elasticInferenceAccelerator_availabilityZone :: Lens.Lens' ElasticInferenceAccelerator (Prelude.Maybe Prelude.Text)
elasticInferenceAccelerator_availabilityZone :: (Maybe Text -> f (Maybe Text))
-> ElasticInferenceAccelerator -> f ElasticInferenceAccelerator
elasticInferenceAccelerator_availabilityZone = (ElasticInferenceAccelerator -> Maybe Text)
-> (ElasticInferenceAccelerator
-> Maybe Text -> ElasticInferenceAccelerator)
-> Lens
ElasticInferenceAccelerator
ElasticInferenceAccelerator
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ElasticInferenceAccelerator' {Maybe Text
availabilityZone :: Maybe Text
$sel:availabilityZone:ElasticInferenceAccelerator' :: ElasticInferenceAccelerator -> Maybe Text
availabilityZone} -> Maybe Text
availabilityZone) (\s :: ElasticInferenceAccelerator
s@ElasticInferenceAccelerator' {} Maybe Text
a -> ElasticInferenceAccelerator
s {$sel:availabilityZone:ElasticInferenceAccelerator' :: Maybe Text
availabilityZone = Maybe Text
a} :: ElasticInferenceAccelerator)
instance Core.FromJSON ElasticInferenceAccelerator where
parseJSON :: Value -> Parser ElasticInferenceAccelerator
parseJSON =
String
-> (Object -> Parser ElasticInferenceAccelerator)
-> Value
-> Parser ElasticInferenceAccelerator
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ElasticInferenceAccelerator"
( \Object
x ->
Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ElasticInferenceAcceleratorHealth
-> Maybe Text
-> ElasticInferenceAccelerator
ElasticInferenceAccelerator'
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ElasticInferenceAcceleratorHealth
-> Maybe Text
-> ElasticInferenceAccelerator)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe ElasticInferenceAcceleratorHealth
-> Maybe Text
-> ElasticInferenceAccelerator)
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
"acceleratorType")
Parser
(Maybe Text
-> Maybe Text
-> Maybe ElasticInferenceAcceleratorHealth
-> Maybe Text
-> ElasticInferenceAccelerator)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe ElasticInferenceAcceleratorHealth
-> Maybe Text
-> ElasticInferenceAccelerator)
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
"acceleratorId")
Parser
(Maybe Text
-> Maybe ElasticInferenceAcceleratorHealth
-> Maybe Text
-> ElasticInferenceAccelerator)
-> Parser (Maybe Text)
-> Parser
(Maybe ElasticInferenceAcceleratorHealth
-> Maybe Text -> ElasticInferenceAccelerator)
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
"attachedResource")
Parser
(Maybe ElasticInferenceAcceleratorHealth
-> Maybe Text -> ElasticInferenceAccelerator)
-> Parser (Maybe ElasticInferenceAcceleratorHealth)
-> Parser (Maybe Text -> ElasticInferenceAccelerator)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ElasticInferenceAcceleratorHealth)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"acceleratorHealth")
Parser (Maybe Text -> ElasticInferenceAccelerator)
-> Parser (Maybe Text) -> Parser ElasticInferenceAccelerator
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
"availabilityZone")
)
instance Prelude.Hashable ElasticInferenceAccelerator
instance Prelude.NFData ElasticInferenceAccelerator