{-# 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.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data InstanceTypeItem = InstanceTypeItem'
{ InstanceTypeItem -> Maybe Text
instanceType :: Prelude.Maybe Prelude.Text
}
deriving (InstanceTypeItem -> InstanceTypeItem -> Bool
(InstanceTypeItem -> InstanceTypeItem -> Bool)
-> (InstanceTypeItem -> InstanceTypeItem -> Bool)
-> Eq InstanceTypeItem
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]
(Int -> ReadS InstanceTypeItem)
-> ReadS [InstanceTypeItem]
-> ReadPrec InstanceTypeItem
-> ReadPrec [InstanceTypeItem]
-> Read 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
(Int -> InstanceTypeItem -> ShowS)
-> (InstanceTypeItem -> String)
-> ([InstanceTypeItem] -> ShowS)
-> Show InstanceTypeItem
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. InstanceTypeItem -> Rep InstanceTypeItem x)
-> (forall x. Rep InstanceTypeItem x -> InstanceTypeItem)
-> Generic InstanceTypeItem
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' :: Maybe Text -> InstanceTypeItem
InstanceTypeItem' {$sel:instanceType:InstanceTypeItem' :: Maybe Text
instanceType = Maybe Text
forall a. Maybe a
Prelude.Nothing}
instanceTypeItem_instanceType :: Lens.Lens' InstanceTypeItem (Prelude.Maybe Prelude.Text)
instanceTypeItem_instanceType :: (Maybe Text -> f (Maybe Text))
-> InstanceTypeItem -> f InstanceTypeItem
instanceTypeItem_instanceType = (InstanceTypeItem -> Maybe Text)
-> (InstanceTypeItem -> Maybe Text -> InstanceTypeItem)
-> Lens InstanceTypeItem InstanceTypeItem (Maybe Text) (Maybe Text)
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 Core.FromJSON InstanceTypeItem where
parseJSON :: Value -> Parser InstanceTypeItem
parseJSON =
String
-> (Object -> Parser InstanceTypeItem)
-> Value
-> Parser InstanceTypeItem
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"InstanceTypeItem"
( \Object
x ->
Maybe Text -> InstanceTypeItem
InstanceTypeItem'
(Maybe Text -> InstanceTypeItem)
-> Parser (Maybe Text) -> Parser InstanceTypeItem
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
"InstanceType")
)
instance Prelude.Hashable InstanceTypeItem
instance Prelude.NFData InstanceTypeItem