{-# 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.UpdateTaintsPayload where
import qualified Amazonka.Core as Core
import Amazonka.EKS.Types.Taint
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data UpdateTaintsPayload = UpdateTaintsPayload'
{
UpdateTaintsPayload -> Maybe [Taint]
addOrUpdateTaints :: Prelude.Maybe [Taint],
UpdateTaintsPayload -> Maybe [Taint]
removeTaints :: Prelude.Maybe [Taint]
}
deriving (UpdateTaintsPayload -> UpdateTaintsPayload -> Bool
(UpdateTaintsPayload -> UpdateTaintsPayload -> Bool)
-> (UpdateTaintsPayload -> UpdateTaintsPayload -> Bool)
-> Eq UpdateTaintsPayload
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateTaintsPayload -> UpdateTaintsPayload -> Bool
$c/= :: UpdateTaintsPayload -> UpdateTaintsPayload -> Bool
== :: UpdateTaintsPayload -> UpdateTaintsPayload -> Bool
$c== :: UpdateTaintsPayload -> UpdateTaintsPayload -> Bool
Prelude.Eq, ReadPrec [UpdateTaintsPayload]
ReadPrec UpdateTaintsPayload
Int -> ReadS UpdateTaintsPayload
ReadS [UpdateTaintsPayload]
(Int -> ReadS UpdateTaintsPayload)
-> ReadS [UpdateTaintsPayload]
-> ReadPrec UpdateTaintsPayload
-> ReadPrec [UpdateTaintsPayload]
-> Read UpdateTaintsPayload
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateTaintsPayload]
$creadListPrec :: ReadPrec [UpdateTaintsPayload]
readPrec :: ReadPrec UpdateTaintsPayload
$creadPrec :: ReadPrec UpdateTaintsPayload
readList :: ReadS [UpdateTaintsPayload]
$creadList :: ReadS [UpdateTaintsPayload]
readsPrec :: Int -> ReadS UpdateTaintsPayload
$creadsPrec :: Int -> ReadS UpdateTaintsPayload
Prelude.Read, Int -> UpdateTaintsPayload -> ShowS
[UpdateTaintsPayload] -> ShowS
UpdateTaintsPayload -> String
(Int -> UpdateTaintsPayload -> ShowS)
-> (UpdateTaintsPayload -> String)
-> ([UpdateTaintsPayload] -> ShowS)
-> Show UpdateTaintsPayload
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateTaintsPayload] -> ShowS
$cshowList :: [UpdateTaintsPayload] -> ShowS
show :: UpdateTaintsPayload -> String
$cshow :: UpdateTaintsPayload -> String
showsPrec :: Int -> UpdateTaintsPayload -> ShowS
$cshowsPrec :: Int -> UpdateTaintsPayload -> ShowS
Prelude.Show, (forall x. UpdateTaintsPayload -> Rep UpdateTaintsPayload x)
-> (forall x. Rep UpdateTaintsPayload x -> UpdateTaintsPayload)
-> Generic UpdateTaintsPayload
forall x. Rep UpdateTaintsPayload x -> UpdateTaintsPayload
forall x. UpdateTaintsPayload -> Rep UpdateTaintsPayload x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateTaintsPayload x -> UpdateTaintsPayload
$cfrom :: forall x. UpdateTaintsPayload -> Rep UpdateTaintsPayload x
Prelude.Generic)
newUpdateTaintsPayload ::
UpdateTaintsPayload
newUpdateTaintsPayload :: UpdateTaintsPayload
newUpdateTaintsPayload =
UpdateTaintsPayload' :: Maybe [Taint] -> Maybe [Taint] -> UpdateTaintsPayload
UpdateTaintsPayload'
{ $sel:addOrUpdateTaints:UpdateTaintsPayload' :: Maybe [Taint]
addOrUpdateTaints =
Maybe [Taint]
forall a. Maybe a
Prelude.Nothing,
$sel:removeTaints:UpdateTaintsPayload' :: Maybe [Taint]
removeTaints = Maybe [Taint]
forall a. Maybe a
Prelude.Nothing
}
updateTaintsPayload_addOrUpdateTaints :: Lens.Lens' UpdateTaintsPayload (Prelude.Maybe [Taint])
updateTaintsPayload_addOrUpdateTaints :: (Maybe [Taint] -> f (Maybe [Taint]))
-> UpdateTaintsPayload -> f UpdateTaintsPayload
updateTaintsPayload_addOrUpdateTaints = (UpdateTaintsPayload -> Maybe [Taint])
-> (UpdateTaintsPayload -> Maybe [Taint] -> UpdateTaintsPayload)
-> Lens
UpdateTaintsPayload
UpdateTaintsPayload
(Maybe [Taint])
(Maybe [Taint])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateTaintsPayload' {Maybe [Taint]
addOrUpdateTaints :: Maybe [Taint]
$sel:addOrUpdateTaints:UpdateTaintsPayload' :: UpdateTaintsPayload -> Maybe [Taint]
addOrUpdateTaints} -> Maybe [Taint]
addOrUpdateTaints) (\s :: UpdateTaintsPayload
s@UpdateTaintsPayload' {} Maybe [Taint]
a -> UpdateTaintsPayload
s {$sel:addOrUpdateTaints:UpdateTaintsPayload' :: Maybe [Taint]
addOrUpdateTaints = Maybe [Taint]
a} :: UpdateTaintsPayload) ((Maybe [Taint] -> f (Maybe [Taint]))
-> UpdateTaintsPayload -> f UpdateTaintsPayload)
-> ((Maybe [Taint] -> f (Maybe [Taint]))
-> Maybe [Taint] -> f (Maybe [Taint]))
-> (Maybe [Taint] -> f (Maybe [Taint]))
-> UpdateTaintsPayload
-> f UpdateTaintsPayload
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Taint] [Taint] [Taint] [Taint]
-> Iso
(Maybe [Taint]) (Maybe [Taint]) (Maybe [Taint]) (Maybe [Taint])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Taint] [Taint] [Taint] [Taint]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
updateTaintsPayload_removeTaints :: Lens.Lens' UpdateTaintsPayload (Prelude.Maybe [Taint])
updateTaintsPayload_removeTaints :: (Maybe [Taint] -> f (Maybe [Taint]))
-> UpdateTaintsPayload -> f UpdateTaintsPayload
updateTaintsPayload_removeTaints = (UpdateTaintsPayload -> Maybe [Taint])
-> (UpdateTaintsPayload -> Maybe [Taint] -> UpdateTaintsPayload)
-> Lens
UpdateTaintsPayload
UpdateTaintsPayload
(Maybe [Taint])
(Maybe [Taint])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateTaintsPayload' {Maybe [Taint]
removeTaints :: Maybe [Taint]
$sel:removeTaints:UpdateTaintsPayload' :: UpdateTaintsPayload -> Maybe [Taint]
removeTaints} -> Maybe [Taint]
removeTaints) (\s :: UpdateTaintsPayload
s@UpdateTaintsPayload' {} Maybe [Taint]
a -> UpdateTaintsPayload
s {$sel:removeTaints:UpdateTaintsPayload' :: Maybe [Taint]
removeTaints = Maybe [Taint]
a} :: UpdateTaintsPayload) ((Maybe [Taint] -> f (Maybe [Taint]))
-> UpdateTaintsPayload -> f UpdateTaintsPayload)
-> ((Maybe [Taint] -> f (Maybe [Taint]))
-> Maybe [Taint] -> f (Maybe [Taint]))
-> (Maybe [Taint] -> f (Maybe [Taint]))
-> UpdateTaintsPayload
-> f UpdateTaintsPayload
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Taint] [Taint] [Taint] [Taint]
-> Iso
(Maybe [Taint]) (Maybe [Taint]) (Maybe [Taint]) (Maybe [Taint])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Taint] [Taint] [Taint] [Taint]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Prelude.Hashable UpdateTaintsPayload
instance Prelude.NFData UpdateTaintsPayload
instance Core.ToJSON UpdateTaintsPayload where
toJSON :: UpdateTaintsPayload -> Value
toJSON UpdateTaintsPayload' {Maybe [Taint]
removeTaints :: Maybe [Taint]
addOrUpdateTaints :: Maybe [Taint]
$sel:removeTaints:UpdateTaintsPayload' :: UpdateTaintsPayload -> Maybe [Taint]
$sel:addOrUpdateTaints:UpdateTaintsPayload' :: UpdateTaintsPayload -> Maybe [Taint]
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"addOrUpdateTaints" Text -> [Taint] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
([Taint] -> Pair) -> Maybe [Taint] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Taint]
addOrUpdateTaints,
(Text
"removeTaints" Text -> [Taint] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([Taint] -> Pair) -> Maybe [Taint] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Taint]
removeTaints
]
)