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