module Stratosphere.EKS.Cluster.UpgradePolicyProperty (
UpgradePolicyProperty(..), mkUpgradePolicyProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data UpgradePolicyProperty
=
UpgradePolicyProperty {UpgradePolicyProperty -> ()
haddock_workaround_ :: (),
UpgradePolicyProperty -> Maybe (Value Text)
supportType :: (Prelude.Maybe (Value Prelude.Text))}
deriving stock (UpgradePolicyProperty -> UpgradePolicyProperty -> Bool
(UpgradePolicyProperty -> UpgradePolicyProperty -> Bool)
-> (UpgradePolicyProperty -> UpgradePolicyProperty -> Bool)
-> Eq UpgradePolicyProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: UpgradePolicyProperty -> UpgradePolicyProperty -> Bool
== :: UpgradePolicyProperty -> UpgradePolicyProperty -> Bool
$c/= :: UpgradePolicyProperty -> UpgradePolicyProperty -> Bool
/= :: UpgradePolicyProperty -> UpgradePolicyProperty -> Bool
Prelude.Eq, Int -> UpgradePolicyProperty -> ShowS
[UpgradePolicyProperty] -> ShowS
UpgradePolicyProperty -> String
(Int -> UpgradePolicyProperty -> ShowS)
-> (UpgradePolicyProperty -> String)
-> ([UpgradePolicyProperty] -> ShowS)
-> Show UpgradePolicyProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> UpgradePolicyProperty -> ShowS
showsPrec :: Int -> UpgradePolicyProperty -> ShowS
$cshow :: UpgradePolicyProperty -> String
show :: UpgradePolicyProperty -> String
$cshowList :: [UpgradePolicyProperty] -> ShowS
showList :: [UpgradePolicyProperty] -> ShowS
Prelude.Show)
mkUpgradePolicyProperty :: UpgradePolicyProperty
mkUpgradePolicyProperty :: UpgradePolicyProperty
mkUpgradePolicyProperty
= UpgradePolicyProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), supportType :: Maybe (Value Text)
supportType = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties UpgradePolicyProperty where
toResourceProperties :: UpgradePolicyProperty -> ResourceProperties
toResourceProperties UpgradePolicyProperty {Maybe (Value Text)
()
haddock_workaround_ :: UpgradePolicyProperty -> ()
supportType :: UpgradePolicyProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
supportType :: Maybe (Value Text)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::EKS::Cluster.UpgradePolicy",
supportsTags :: Bool
supportsTags = Bool
Prelude.False,
properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"SupportType" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
supportType])}
instance JSON.ToJSON UpgradePolicyProperty where
toJSON :: UpgradePolicyProperty -> Value
toJSON UpgradePolicyProperty {Maybe (Value Text)
()
haddock_workaround_ :: UpgradePolicyProperty -> ()
supportType :: UpgradePolicyProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
supportType :: Maybe (Value Text)
..}
= [(Key, Value)] -> Value
JSON.object
([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"SupportType" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
supportType]))
instance Property "SupportType" UpgradePolicyProperty where
type PropertyType "SupportType" UpgradePolicyProperty = Value Prelude.Text
set :: PropertyType "SupportType" UpgradePolicyProperty
-> UpgradePolicyProperty -> UpgradePolicyProperty
set PropertyType "SupportType" UpgradePolicyProperty
newValue UpgradePolicyProperty {Maybe (Value Text)
()
haddock_workaround_ :: UpgradePolicyProperty -> ()
supportType :: UpgradePolicyProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
supportType :: Maybe (Value Text)
..}
= UpgradePolicyProperty {supportType :: Maybe (Value Text)
supportType = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "SupportType" UpgradePolicyProperty
Value Text
newValue, ()
haddock_workaround_ :: ()
haddock_workaround_ :: ()
..}