{-# 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.Outposts.Types.InstanceTypeItem 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
data InstanceTypeItem = InstanceTypeItem'
{ InstanceTypeItem -> Maybe Text
instanceType :: Prelude.Maybe Prelude.Text
}
deriving (InstanceTypeItem -> InstanceTypeItem -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: InstanceTypeItem -> InstanceTypeItem -> Bool
$c/= :: InstanceTypeItem -> InstanceTypeItem -> Bool
== :: InstanceTypeItem -> InstanceTypeItem -> Bool
$c== :: InstanceTypeItem -> InstanceTypeItem -> Bool
Prelude.Eq, ReadPrec [InstanceTypeItem]
ReadPrec InstanceTypeItem
Int -> ReadS InstanceTypeItem
ReadS [InstanceTypeItem]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [InstanceTypeItem]
$creadListPrec :: ReadPrec [InstanceTypeItem]
readPrec :: ReadPrec InstanceTypeItem
$creadPrec :: ReadPrec InstanceTypeItem
readList :: ReadS [InstanceTypeItem]
$creadList :: ReadS [InstanceTypeItem]
readsPrec :: Int -> ReadS InstanceTypeItem
$creadsPrec :: Int -> ReadS InstanceTypeItem
Prelude.Read, Int -> InstanceTypeItem -> ShowS
[InstanceTypeItem] -> ShowS
InstanceTypeItem -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [InstanceTypeItem] -> ShowS
$cshowList :: [InstanceTypeItem] -> ShowS
show :: InstanceTypeItem -> String
$cshow :: InstanceTypeItem -> String
showsPrec :: Int -> InstanceTypeItem -> ShowS
$cshowsPrec :: Int -> InstanceTypeItem -> ShowS
Prelude.Show, forall x. Rep InstanceTypeItem x -> InstanceTypeItem
forall x. InstanceTypeItem -> Rep InstanceTypeItem x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep InstanceTypeItem x -> InstanceTypeItem
$cfrom :: forall x. InstanceTypeItem -> Rep InstanceTypeItem x
Prelude.Generic)
newInstanceTypeItem ::
InstanceTypeItem
newInstanceTypeItem :: InstanceTypeItem
newInstanceTypeItem =
InstanceTypeItem' {$sel:instanceType:InstanceTypeItem' :: Maybe Text
instanceType = forall a. Maybe a
Prelude.Nothing}
instanceTypeItem_instanceType :: Lens.Lens' InstanceTypeItem (Prelude.Maybe Prelude.Text)
instanceTypeItem_instanceType :: Lens' InstanceTypeItem (Maybe Text)
instanceTypeItem_instanceType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InstanceTypeItem' {Maybe Text
instanceType :: Maybe Text
$sel:instanceType:InstanceTypeItem' :: InstanceTypeItem -> Maybe Text
instanceType} -> Maybe Text
instanceType) (\s :: InstanceTypeItem
s@InstanceTypeItem' {} Maybe Text
a -> InstanceTypeItem
s {$sel:instanceType:InstanceTypeItem' :: Maybe Text
instanceType = Maybe Text
a} :: InstanceTypeItem)
instance Data.FromJSON InstanceTypeItem where
parseJSON :: Value -> Parser InstanceTypeItem
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"InstanceTypeItem"
( \Object
x ->
Maybe Text -> InstanceTypeItem
InstanceTypeItem'
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
"InstanceType")
)
instance Prelude.Hashable InstanceTypeItem where
hashWithSalt :: Int -> InstanceTypeItem -> Int
hashWithSalt Int
_salt InstanceTypeItem' {Maybe Text
instanceType :: Maybe Text
$sel:instanceType:InstanceTypeItem' :: InstanceTypeItem -> Maybe Text
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
instanceType
instance Prelude.NFData InstanceTypeItem where
rnf :: InstanceTypeItem -> ()
rnf InstanceTypeItem' {Maybe Text
instanceType :: Maybe Text
$sel:instanceType:InstanceTypeItem' :: InstanceTypeItem -> Maybe Text
..} = forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
instanceType