{-# 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.AcceleratorTypeOffering where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.ElasticInference.Types.LocationType
import qualified Amazonka.Prelude as Prelude
data AcceleratorTypeOffering = AcceleratorTypeOffering'
{
AcceleratorTypeOffering -> Maybe Text
acceleratorType :: Prelude.Maybe Prelude.Text,
AcceleratorTypeOffering -> Maybe Text
location :: Prelude.Maybe Prelude.Text,
AcceleratorTypeOffering -> Maybe LocationType
locationType :: Prelude.Maybe LocationType
}
deriving (AcceleratorTypeOffering -> AcceleratorTypeOffering -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AcceleratorTypeOffering -> AcceleratorTypeOffering -> Bool
$c/= :: AcceleratorTypeOffering -> AcceleratorTypeOffering -> Bool
== :: AcceleratorTypeOffering -> AcceleratorTypeOffering -> Bool
$c== :: AcceleratorTypeOffering -> AcceleratorTypeOffering -> Bool
Prelude.Eq, ReadPrec [AcceleratorTypeOffering]
ReadPrec AcceleratorTypeOffering
Int -> ReadS AcceleratorTypeOffering
ReadS [AcceleratorTypeOffering]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AcceleratorTypeOffering]
$creadListPrec :: ReadPrec [AcceleratorTypeOffering]
readPrec :: ReadPrec AcceleratorTypeOffering
$creadPrec :: ReadPrec AcceleratorTypeOffering
readList :: ReadS [AcceleratorTypeOffering]
$creadList :: ReadS [AcceleratorTypeOffering]
readsPrec :: Int -> ReadS AcceleratorTypeOffering
$creadsPrec :: Int -> ReadS AcceleratorTypeOffering
Prelude.Read, Int -> AcceleratorTypeOffering -> ShowS
[AcceleratorTypeOffering] -> ShowS
AcceleratorTypeOffering -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AcceleratorTypeOffering] -> ShowS
$cshowList :: [AcceleratorTypeOffering] -> ShowS
show :: AcceleratorTypeOffering -> String
$cshow :: AcceleratorTypeOffering -> String
showsPrec :: Int -> AcceleratorTypeOffering -> ShowS
$cshowsPrec :: Int -> AcceleratorTypeOffering -> ShowS
Prelude.Show, forall x. Rep AcceleratorTypeOffering x -> AcceleratorTypeOffering
forall x. AcceleratorTypeOffering -> Rep AcceleratorTypeOffering x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep AcceleratorTypeOffering x -> AcceleratorTypeOffering
$cfrom :: forall x. AcceleratorTypeOffering -> Rep AcceleratorTypeOffering x
Prelude.Generic)
newAcceleratorTypeOffering ::
AcceleratorTypeOffering
newAcceleratorTypeOffering :: AcceleratorTypeOffering
newAcceleratorTypeOffering =
AcceleratorTypeOffering'
{ $sel:acceleratorType:AcceleratorTypeOffering' :: Maybe Text
acceleratorType =
forall a. Maybe a
Prelude.Nothing,
$sel:location:AcceleratorTypeOffering' :: Maybe Text
location = forall a. Maybe a
Prelude.Nothing,
$sel:locationType:AcceleratorTypeOffering' :: Maybe LocationType
locationType = forall a. Maybe a
Prelude.Nothing
}
acceleratorTypeOffering_acceleratorType :: Lens.Lens' AcceleratorTypeOffering (Prelude.Maybe Prelude.Text)
acceleratorTypeOffering_acceleratorType :: Lens' AcceleratorTypeOffering (Maybe Text)
acceleratorTypeOffering_acceleratorType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AcceleratorTypeOffering' {Maybe Text
acceleratorType :: Maybe Text
$sel:acceleratorType:AcceleratorTypeOffering' :: AcceleratorTypeOffering -> Maybe Text
acceleratorType} -> Maybe Text
acceleratorType) (\s :: AcceleratorTypeOffering
s@AcceleratorTypeOffering' {} Maybe Text
a -> AcceleratorTypeOffering
s {$sel:acceleratorType:AcceleratorTypeOffering' :: Maybe Text
acceleratorType = Maybe Text
a} :: AcceleratorTypeOffering)
acceleratorTypeOffering_location :: Lens.Lens' AcceleratorTypeOffering (Prelude.Maybe Prelude.Text)
acceleratorTypeOffering_location :: Lens' AcceleratorTypeOffering (Maybe Text)
acceleratorTypeOffering_location = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AcceleratorTypeOffering' {Maybe Text
location :: Maybe Text
$sel:location:AcceleratorTypeOffering' :: AcceleratorTypeOffering -> Maybe Text
location} -> Maybe Text
location) (\s :: AcceleratorTypeOffering
s@AcceleratorTypeOffering' {} Maybe Text
a -> AcceleratorTypeOffering
s {$sel:location:AcceleratorTypeOffering' :: Maybe Text
location = Maybe Text
a} :: AcceleratorTypeOffering)
acceleratorTypeOffering_locationType :: Lens.Lens' AcceleratorTypeOffering (Prelude.Maybe LocationType)
acceleratorTypeOffering_locationType :: Lens' AcceleratorTypeOffering (Maybe LocationType)
acceleratorTypeOffering_locationType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AcceleratorTypeOffering' {Maybe LocationType
locationType :: Maybe LocationType
$sel:locationType:AcceleratorTypeOffering' :: AcceleratorTypeOffering -> Maybe LocationType
locationType} -> Maybe LocationType
locationType) (\s :: AcceleratorTypeOffering
s@AcceleratorTypeOffering' {} Maybe LocationType
a -> AcceleratorTypeOffering
s {$sel:locationType:AcceleratorTypeOffering' :: Maybe LocationType
locationType = Maybe LocationType
a} :: AcceleratorTypeOffering)
instance Data.FromJSON AcceleratorTypeOffering where
parseJSON :: Value -> Parser AcceleratorTypeOffering
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"AcceleratorTypeOffering"
( \Object
x ->
Maybe Text
-> Maybe Text -> Maybe LocationType -> AcceleratorTypeOffering
AcceleratorTypeOffering'
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
"acceleratorType")
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
"location")
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
"locationType")
)
instance Prelude.Hashable AcceleratorTypeOffering where
hashWithSalt :: Int -> AcceleratorTypeOffering -> Int
hashWithSalt Int
_salt AcceleratorTypeOffering' {Maybe Text
Maybe LocationType
locationType :: Maybe LocationType
location :: Maybe Text
acceleratorType :: Maybe Text
$sel:locationType:AcceleratorTypeOffering' :: AcceleratorTypeOffering -> Maybe LocationType
$sel:location:AcceleratorTypeOffering' :: AcceleratorTypeOffering -> Maybe Text
$sel:acceleratorType:AcceleratorTypeOffering' :: AcceleratorTypeOffering -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
acceleratorType
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
location
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe LocationType
locationType
instance Prelude.NFData AcceleratorTypeOffering where
rnf :: AcceleratorTypeOffering -> ()
rnf AcceleratorTypeOffering' {Maybe Text
Maybe LocationType
locationType :: Maybe LocationType
location :: Maybe Text
acceleratorType :: Maybe Text
$sel:locationType:AcceleratorTypeOffering' :: AcceleratorTypeOffering -> Maybe LocationType
$sel:location:AcceleratorTypeOffering' :: AcceleratorTypeOffering -> Maybe Text
$sel:acceleratorType:AcceleratorTypeOffering' :: AcceleratorTypeOffering -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
acceleratorType
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
location
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe LocationType
locationType