{-# 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.DAX.Types.NodeTypeSpecificValue where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data NodeTypeSpecificValue = NodeTypeSpecificValue'
{
NodeTypeSpecificValue -> Maybe Text
value :: Prelude.Maybe Prelude.Text,
NodeTypeSpecificValue -> Maybe Text
nodeType :: Prelude.Maybe Prelude.Text
}
deriving (NodeTypeSpecificValue -> NodeTypeSpecificValue -> Bool
(NodeTypeSpecificValue -> NodeTypeSpecificValue -> Bool)
-> (NodeTypeSpecificValue -> NodeTypeSpecificValue -> Bool)
-> Eq NodeTypeSpecificValue
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: NodeTypeSpecificValue -> NodeTypeSpecificValue -> Bool
$c/= :: NodeTypeSpecificValue -> NodeTypeSpecificValue -> Bool
== :: NodeTypeSpecificValue -> NodeTypeSpecificValue -> Bool
$c== :: NodeTypeSpecificValue -> NodeTypeSpecificValue -> Bool
Prelude.Eq, ReadPrec [NodeTypeSpecificValue]
ReadPrec NodeTypeSpecificValue
Int -> ReadS NodeTypeSpecificValue
ReadS [NodeTypeSpecificValue]
(Int -> ReadS NodeTypeSpecificValue)
-> ReadS [NodeTypeSpecificValue]
-> ReadPrec NodeTypeSpecificValue
-> ReadPrec [NodeTypeSpecificValue]
-> Read NodeTypeSpecificValue
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [NodeTypeSpecificValue]
$creadListPrec :: ReadPrec [NodeTypeSpecificValue]
readPrec :: ReadPrec NodeTypeSpecificValue
$creadPrec :: ReadPrec NodeTypeSpecificValue
readList :: ReadS [NodeTypeSpecificValue]
$creadList :: ReadS [NodeTypeSpecificValue]
readsPrec :: Int -> ReadS NodeTypeSpecificValue
$creadsPrec :: Int -> ReadS NodeTypeSpecificValue
Prelude.Read, Int -> NodeTypeSpecificValue -> ShowS
[NodeTypeSpecificValue] -> ShowS
NodeTypeSpecificValue -> String
(Int -> NodeTypeSpecificValue -> ShowS)
-> (NodeTypeSpecificValue -> String)
-> ([NodeTypeSpecificValue] -> ShowS)
-> Show NodeTypeSpecificValue
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [NodeTypeSpecificValue] -> ShowS
$cshowList :: [NodeTypeSpecificValue] -> ShowS
show :: NodeTypeSpecificValue -> String
$cshow :: NodeTypeSpecificValue -> String
showsPrec :: Int -> NodeTypeSpecificValue -> ShowS
$cshowsPrec :: Int -> NodeTypeSpecificValue -> ShowS
Prelude.Show, (forall x. NodeTypeSpecificValue -> Rep NodeTypeSpecificValue x)
-> (forall x. Rep NodeTypeSpecificValue x -> NodeTypeSpecificValue)
-> Generic NodeTypeSpecificValue
forall x. Rep NodeTypeSpecificValue x -> NodeTypeSpecificValue
forall x. NodeTypeSpecificValue -> Rep NodeTypeSpecificValue x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep NodeTypeSpecificValue x -> NodeTypeSpecificValue
$cfrom :: forall x. NodeTypeSpecificValue -> Rep NodeTypeSpecificValue x
Prelude.Generic)
newNodeTypeSpecificValue ::
NodeTypeSpecificValue
newNodeTypeSpecificValue :: NodeTypeSpecificValue
newNodeTypeSpecificValue =
NodeTypeSpecificValue' :: Maybe Text -> Maybe Text -> NodeTypeSpecificValue
NodeTypeSpecificValue'
{ $sel:value:NodeTypeSpecificValue' :: Maybe Text
value = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:nodeType:NodeTypeSpecificValue' :: Maybe Text
nodeType = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
nodeTypeSpecificValue_value :: Lens.Lens' NodeTypeSpecificValue (Prelude.Maybe Prelude.Text)
nodeTypeSpecificValue_value :: (Maybe Text -> f (Maybe Text))
-> NodeTypeSpecificValue -> f NodeTypeSpecificValue
nodeTypeSpecificValue_value = (NodeTypeSpecificValue -> Maybe Text)
-> (NodeTypeSpecificValue -> Maybe Text -> NodeTypeSpecificValue)
-> Lens
NodeTypeSpecificValue
NodeTypeSpecificValue
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NodeTypeSpecificValue' {Maybe Text
value :: Maybe Text
$sel:value:NodeTypeSpecificValue' :: NodeTypeSpecificValue -> Maybe Text
value} -> Maybe Text
value) (\s :: NodeTypeSpecificValue
s@NodeTypeSpecificValue' {} Maybe Text
a -> NodeTypeSpecificValue
s {$sel:value:NodeTypeSpecificValue' :: Maybe Text
value = Maybe Text
a} :: NodeTypeSpecificValue)
nodeTypeSpecificValue_nodeType :: Lens.Lens' NodeTypeSpecificValue (Prelude.Maybe Prelude.Text)
nodeTypeSpecificValue_nodeType :: (Maybe Text -> f (Maybe Text))
-> NodeTypeSpecificValue -> f NodeTypeSpecificValue
nodeTypeSpecificValue_nodeType = (NodeTypeSpecificValue -> Maybe Text)
-> (NodeTypeSpecificValue -> Maybe Text -> NodeTypeSpecificValue)
-> Lens
NodeTypeSpecificValue
NodeTypeSpecificValue
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NodeTypeSpecificValue' {Maybe Text
nodeType :: Maybe Text
$sel:nodeType:NodeTypeSpecificValue' :: NodeTypeSpecificValue -> Maybe Text
nodeType} -> Maybe Text
nodeType) (\s :: NodeTypeSpecificValue
s@NodeTypeSpecificValue' {} Maybe Text
a -> NodeTypeSpecificValue
s {$sel:nodeType:NodeTypeSpecificValue' :: Maybe Text
nodeType = Maybe Text
a} :: NodeTypeSpecificValue)
instance Core.FromJSON NodeTypeSpecificValue where
parseJSON :: Value -> Parser NodeTypeSpecificValue
parseJSON =
String
-> (Object -> Parser NodeTypeSpecificValue)
-> Value
-> Parser NodeTypeSpecificValue
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"NodeTypeSpecificValue"
( \Object
x ->
Maybe Text -> Maybe Text -> NodeTypeSpecificValue
NodeTypeSpecificValue'
(Maybe Text -> Maybe Text -> NodeTypeSpecificValue)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> NodeTypeSpecificValue)
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
"Value")
Parser (Maybe Text -> NodeTypeSpecificValue)
-> Parser (Maybe Text) -> Parser NodeTypeSpecificValue
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
"NodeType")
)
instance Prelude.Hashable NodeTypeSpecificValue
instance Prelude.NFData NodeTypeSpecificValue