module Stratosphere.EKS.Nodegroup.UpdateConfigProperty (
        UpdateConfigProperty(..), mkUpdateConfigProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data UpdateConfigProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-eks-nodegroup-updateconfig.html>
    UpdateConfigProperty {UpdateConfigProperty -> ()
haddock_workaround_ :: (),
                          -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-eks-nodegroup-updateconfig.html#cfn-eks-nodegroup-updateconfig-maxunavailable>
                          UpdateConfigProperty -> Maybe (Value Double)
maxUnavailable :: (Prelude.Maybe (Value Prelude.Double)),
                          -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-eks-nodegroup-updateconfig.html#cfn-eks-nodegroup-updateconfig-maxunavailablepercentage>
                          UpdateConfigProperty -> Maybe (Value Double)
maxUnavailablePercentage :: (Prelude.Maybe (Value Prelude.Double)),
                          -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-eks-nodegroup-updateconfig.html#cfn-eks-nodegroup-updateconfig-updatestrategy>
                          UpdateConfigProperty -> Maybe (Value Text)
updateStrategy :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (UpdateConfigProperty -> UpdateConfigProperty -> Bool
(UpdateConfigProperty -> UpdateConfigProperty -> Bool)
-> (UpdateConfigProperty -> UpdateConfigProperty -> Bool)
-> Eq UpdateConfigProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: UpdateConfigProperty -> UpdateConfigProperty -> Bool
== :: UpdateConfigProperty -> UpdateConfigProperty -> Bool
$c/= :: UpdateConfigProperty -> UpdateConfigProperty -> Bool
/= :: UpdateConfigProperty -> UpdateConfigProperty -> Bool
Prelude.Eq, Int -> UpdateConfigProperty -> ShowS
[UpdateConfigProperty] -> ShowS
UpdateConfigProperty -> String
(Int -> UpdateConfigProperty -> ShowS)
-> (UpdateConfigProperty -> String)
-> ([UpdateConfigProperty] -> ShowS)
-> Show UpdateConfigProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> UpdateConfigProperty -> ShowS
showsPrec :: Int -> UpdateConfigProperty -> ShowS
$cshow :: UpdateConfigProperty -> String
show :: UpdateConfigProperty -> String
$cshowList :: [UpdateConfigProperty] -> ShowS
showList :: [UpdateConfigProperty] -> ShowS
Prelude.Show)
mkUpdateConfigProperty :: UpdateConfigProperty
mkUpdateConfigProperty :: UpdateConfigProperty
mkUpdateConfigProperty
  = UpdateConfigProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), maxUnavailable :: Maybe (Value Double)
maxUnavailable = Maybe (Value Double)
forall a. Maybe a
Prelude.Nothing,
       maxUnavailablePercentage :: Maybe (Value Double)
maxUnavailablePercentage = Maybe (Value Double)
forall a. Maybe a
Prelude.Nothing,
       updateStrategy :: Maybe (Value Text)
updateStrategy = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties UpdateConfigProperty where
  toResourceProperties :: UpdateConfigProperty -> ResourceProperties
toResourceProperties UpdateConfigProperty {Maybe (Value Double)
Maybe (Value Text)
()
haddock_workaround_ :: UpdateConfigProperty -> ()
maxUnavailable :: UpdateConfigProperty -> Maybe (Value Double)
maxUnavailablePercentage :: UpdateConfigProperty -> Maybe (Value Double)
updateStrategy :: UpdateConfigProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
maxUnavailable :: Maybe (Value Double)
maxUnavailablePercentage :: Maybe (Value Double)
updateStrategy :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::EKS::Nodegroup.UpdateConfig",
         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 Double -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"MaxUnavailable" (Value Double -> (Key, Value))
-> Maybe (Value Double) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Double)
maxUnavailable,
                            Key -> Value Double -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"MaxUnavailablePercentage"
                              (Value Double -> (Key, Value))
-> Maybe (Value Double) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Double)
maxUnavailablePercentage,
                            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
"UpdateStrategy" (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)
updateStrategy])}
instance JSON.ToJSON UpdateConfigProperty where
  toJSON :: UpdateConfigProperty -> Value
toJSON UpdateConfigProperty {Maybe (Value Double)
Maybe (Value Text)
()
haddock_workaround_ :: UpdateConfigProperty -> ()
maxUnavailable :: UpdateConfigProperty -> Maybe (Value Double)
maxUnavailablePercentage :: UpdateConfigProperty -> Maybe (Value Double)
updateStrategy :: UpdateConfigProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
maxUnavailable :: Maybe (Value Double)
maxUnavailablePercentage :: Maybe (Value Double)
updateStrategy :: 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 Double -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"MaxUnavailable" (Value Double -> (Key, Value))
-> Maybe (Value Double) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Double)
maxUnavailable,
               Key -> Value Double -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"MaxUnavailablePercentage"
                 (Value Double -> (Key, Value))
-> Maybe (Value Double) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Double)
maxUnavailablePercentage,
               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
"UpdateStrategy" (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)
updateStrategy]))
instance Property "MaxUnavailable" UpdateConfigProperty where
  type PropertyType "MaxUnavailable" UpdateConfigProperty = Value Prelude.Double
  set :: PropertyType "MaxUnavailable" UpdateConfigProperty
-> UpdateConfigProperty -> UpdateConfigProperty
set PropertyType "MaxUnavailable" UpdateConfigProperty
newValue UpdateConfigProperty {Maybe (Value Double)
Maybe (Value Text)
()
haddock_workaround_ :: UpdateConfigProperty -> ()
maxUnavailable :: UpdateConfigProperty -> Maybe (Value Double)
maxUnavailablePercentage :: UpdateConfigProperty -> Maybe (Value Double)
updateStrategy :: UpdateConfigProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
maxUnavailable :: Maybe (Value Double)
maxUnavailablePercentage :: Maybe (Value Double)
updateStrategy :: Maybe (Value Text)
..}
    = UpdateConfigProperty {maxUnavailable :: Maybe (Value Double)
maxUnavailable = Value Double -> Maybe (Value Double)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "MaxUnavailable" UpdateConfigProperty
Value Double
newValue, Maybe (Value Double)
Maybe (Value Text)
()
haddock_workaround_ :: ()
maxUnavailablePercentage :: Maybe (Value Double)
updateStrategy :: Maybe (Value Text)
haddock_workaround_ :: ()
maxUnavailablePercentage :: Maybe (Value Double)
updateStrategy :: Maybe (Value Text)
..}
instance Property "MaxUnavailablePercentage" UpdateConfigProperty where
  type PropertyType "MaxUnavailablePercentage" UpdateConfigProperty = Value Prelude.Double
  set :: PropertyType "MaxUnavailablePercentage" UpdateConfigProperty
-> UpdateConfigProperty -> UpdateConfigProperty
set PropertyType "MaxUnavailablePercentage" UpdateConfigProperty
newValue UpdateConfigProperty {Maybe (Value Double)
Maybe (Value Text)
()
haddock_workaround_ :: UpdateConfigProperty -> ()
maxUnavailable :: UpdateConfigProperty -> Maybe (Value Double)
maxUnavailablePercentage :: UpdateConfigProperty -> Maybe (Value Double)
updateStrategy :: UpdateConfigProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
maxUnavailable :: Maybe (Value Double)
maxUnavailablePercentage :: Maybe (Value Double)
updateStrategy :: Maybe (Value Text)
..}
    = UpdateConfigProperty
        {maxUnavailablePercentage :: Maybe (Value Double)
maxUnavailablePercentage = Value Double -> Maybe (Value Double)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "MaxUnavailablePercentage" UpdateConfigProperty
Value Double
newValue, Maybe (Value Double)
Maybe (Value Text)
()
haddock_workaround_ :: ()
maxUnavailable :: Maybe (Value Double)
updateStrategy :: Maybe (Value Text)
haddock_workaround_ :: ()
maxUnavailable :: Maybe (Value Double)
updateStrategy :: Maybe (Value Text)
..}
instance Property "UpdateStrategy" UpdateConfigProperty where
  type PropertyType "UpdateStrategy" UpdateConfigProperty = Value Prelude.Text
  set :: PropertyType "UpdateStrategy" UpdateConfigProperty
-> UpdateConfigProperty -> UpdateConfigProperty
set PropertyType "UpdateStrategy" UpdateConfigProperty
newValue UpdateConfigProperty {Maybe (Value Double)
Maybe (Value Text)
()
haddock_workaround_ :: UpdateConfigProperty -> ()
maxUnavailable :: UpdateConfigProperty -> Maybe (Value Double)
maxUnavailablePercentage :: UpdateConfigProperty -> Maybe (Value Double)
updateStrategy :: UpdateConfigProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
maxUnavailable :: Maybe (Value Double)
maxUnavailablePercentage :: Maybe (Value Double)
updateStrategy :: Maybe (Value Text)
..}
    = UpdateConfigProperty {updateStrategy :: Maybe (Value Text)
updateStrategy = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "UpdateStrategy" UpdateConfigProperty
Value Text
newValue, Maybe (Value Double)
()
haddock_workaround_ :: ()
maxUnavailable :: Maybe (Value Double)
maxUnavailablePercentage :: Maybe (Value Double)
haddock_workaround_ :: ()
maxUnavailable :: Maybe (Value Double)
maxUnavailablePercentage :: Maybe (Value Double)
..}