module Stratosphere.SageMaker.Endpoint.RollingUpdatePolicyProperty (
        module Exports, RollingUpdatePolicyProperty(..),
        mkRollingUpdatePolicyProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.SageMaker.Endpoint.CapacitySizeProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data RollingUpdatePolicyProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-endpoint-rollingupdatepolicy.html>
    RollingUpdatePolicyProperty {RollingUpdatePolicyProperty -> ()
haddock_workaround_ :: (),
                                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-endpoint-rollingupdatepolicy.html#cfn-sagemaker-endpoint-rollingupdatepolicy-maximumbatchsize>
                                 RollingUpdatePolicyProperty -> CapacitySizeProperty
maximumBatchSize :: CapacitySizeProperty,
                                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-endpoint-rollingupdatepolicy.html#cfn-sagemaker-endpoint-rollingupdatepolicy-maximumexecutiontimeoutinseconds>
                                 RollingUpdatePolicyProperty -> Maybe (Value Integer)
maximumExecutionTimeoutInSeconds :: (Prelude.Maybe (Value Prelude.Integer)),
                                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-endpoint-rollingupdatepolicy.html#cfn-sagemaker-endpoint-rollingupdatepolicy-rollbackmaximumbatchsize>
                                 RollingUpdatePolicyProperty -> Maybe CapacitySizeProperty
rollbackMaximumBatchSize :: (Prelude.Maybe CapacitySizeProperty),
                                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-endpoint-rollingupdatepolicy.html#cfn-sagemaker-endpoint-rollingupdatepolicy-waitintervalinseconds>
                                 RollingUpdatePolicyProperty -> Value Integer
waitIntervalInSeconds :: (Value Prelude.Integer)}
  deriving stock (RollingUpdatePolicyProperty -> RollingUpdatePolicyProperty -> Bool
(RollingUpdatePolicyProperty
 -> RollingUpdatePolicyProperty -> Bool)
-> (RollingUpdatePolicyProperty
    -> RollingUpdatePolicyProperty -> Bool)
-> Eq RollingUpdatePolicyProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: RollingUpdatePolicyProperty -> RollingUpdatePolicyProperty -> Bool
== :: RollingUpdatePolicyProperty -> RollingUpdatePolicyProperty -> Bool
$c/= :: RollingUpdatePolicyProperty -> RollingUpdatePolicyProperty -> Bool
/= :: RollingUpdatePolicyProperty -> RollingUpdatePolicyProperty -> Bool
Prelude.Eq, Int -> RollingUpdatePolicyProperty -> ShowS
[RollingUpdatePolicyProperty] -> ShowS
RollingUpdatePolicyProperty -> String
(Int -> RollingUpdatePolicyProperty -> ShowS)
-> (RollingUpdatePolicyProperty -> String)
-> ([RollingUpdatePolicyProperty] -> ShowS)
-> Show RollingUpdatePolicyProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> RollingUpdatePolicyProperty -> ShowS
showsPrec :: Int -> RollingUpdatePolicyProperty -> ShowS
$cshow :: RollingUpdatePolicyProperty -> String
show :: RollingUpdatePolicyProperty -> String
$cshowList :: [RollingUpdatePolicyProperty] -> ShowS
showList :: [RollingUpdatePolicyProperty] -> ShowS
Prelude.Show)
mkRollingUpdatePolicyProperty ::
  CapacitySizeProperty
  -> Value Prelude.Integer -> RollingUpdatePolicyProperty
mkRollingUpdatePolicyProperty :: CapacitySizeProperty
-> Value Integer -> RollingUpdatePolicyProperty
mkRollingUpdatePolicyProperty
  CapacitySizeProperty
maximumBatchSize
  Value Integer
waitIntervalInSeconds
  = RollingUpdatePolicyProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), maximumBatchSize :: CapacitySizeProperty
maximumBatchSize = CapacitySizeProperty
maximumBatchSize,
       waitIntervalInSeconds :: Value Integer
waitIntervalInSeconds = Value Integer
waitIntervalInSeconds,
       maximumExecutionTimeoutInSeconds :: Maybe (Value Integer)
maximumExecutionTimeoutInSeconds = Maybe (Value Integer)
forall a. Maybe a
Prelude.Nothing,
       rollbackMaximumBatchSize :: Maybe CapacitySizeProperty
rollbackMaximumBatchSize = Maybe CapacitySizeProperty
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties RollingUpdatePolicyProperty where
  toResourceProperties :: RollingUpdatePolicyProperty -> ResourceProperties
toResourceProperties RollingUpdatePolicyProperty {Maybe (Value Integer)
Maybe CapacitySizeProperty
()
Value Integer
CapacitySizeProperty
haddock_workaround_ :: RollingUpdatePolicyProperty -> ()
maximumBatchSize :: RollingUpdatePolicyProperty -> CapacitySizeProperty
maximumExecutionTimeoutInSeconds :: RollingUpdatePolicyProperty -> Maybe (Value Integer)
rollbackMaximumBatchSize :: RollingUpdatePolicyProperty -> Maybe CapacitySizeProperty
waitIntervalInSeconds :: RollingUpdatePolicyProperty -> Value Integer
haddock_workaround_ :: ()
maximumBatchSize :: CapacitySizeProperty
maximumExecutionTimeoutInSeconds :: Maybe (Value Integer)
rollbackMaximumBatchSize :: Maybe CapacitySizeProperty
waitIntervalInSeconds :: Value Integer
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::SageMaker::Endpoint.RollingUpdatePolicy",
         supportsTags :: Bool
supportsTags = Bool
Prelude.False,
         properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
                        ([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
                           [Key
"MaximumBatchSize" Key -> CapacitySizeProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= CapacitySizeProperty
maximumBatchSize,
                            Key
"WaitIntervalInSeconds" Key -> Value Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Value Integer
waitIntervalInSeconds]
                           ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                              [Key -> Value Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"MaximumExecutionTimeoutInSeconds"
                                 (Value Integer -> (Key, Value))
-> Maybe (Value Integer) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Integer)
maximumExecutionTimeoutInSeconds,
                               Key -> CapacitySizeProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"RollbackMaximumBatchSize"
                                 (CapacitySizeProperty -> (Key, Value))
-> Maybe CapacitySizeProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe CapacitySizeProperty
rollbackMaximumBatchSize]))}
instance JSON.ToJSON RollingUpdatePolicyProperty where
  toJSON :: RollingUpdatePolicyProperty -> Value
toJSON RollingUpdatePolicyProperty {Maybe (Value Integer)
Maybe CapacitySizeProperty
()
Value Integer
CapacitySizeProperty
haddock_workaround_ :: RollingUpdatePolicyProperty -> ()
maximumBatchSize :: RollingUpdatePolicyProperty -> CapacitySizeProperty
maximumExecutionTimeoutInSeconds :: RollingUpdatePolicyProperty -> Maybe (Value Integer)
rollbackMaximumBatchSize :: RollingUpdatePolicyProperty -> Maybe CapacitySizeProperty
waitIntervalInSeconds :: RollingUpdatePolicyProperty -> Value Integer
haddock_workaround_ :: ()
maximumBatchSize :: CapacitySizeProperty
maximumExecutionTimeoutInSeconds :: Maybe (Value Integer)
rollbackMaximumBatchSize :: Maybe CapacitySizeProperty
waitIntervalInSeconds :: Value Integer
..}
    = [(Key, Value)] -> Value
JSON.object
        ([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
           ([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
              [Key
"MaximumBatchSize" Key -> CapacitySizeProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= CapacitySizeProperty
maximumBatchSize,
               Key
"WaitIntervalInSeconds" Key -> Value Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Value Integer
waitIntervalInSeconds]
              ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                 [Key -> Value Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"MaximumExecutionTimeoutInSeconds"
                    (Value Integer -> (Key, Value))
-> Maybe (Value Integer) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Integer)
maximumExecutionTimeoutInSeconds,
                  Key -> CapacitySizeProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"RollbackMaximumBatchSize"
                    (CapacitySizeProperty -> (Key, Value))
-> Maybe CapacitySizeProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe CapacitySizeProperty
rollbackMaximumBatchSize])))
instance Property "MaximumBatchSize" RollingUpdatePolicyProperty where
  type PropertyType "MaximumBatchSize" RollingUpdatePolicyProperty = CapacitySizeProperty
  set :: PropertyType "MaximumBatchSize" RollingUpdatePolicyProperty
-> RollingUpdatePolicyProperty -> RollingUpdatePolicyProperty
set PropertyType "MaximumBatchSize" RollingUpdatePolicyProperty
newValue RollingUpdatePolicyProperty {Maybe (Value Integer)
Maybe CapacitySizeProperty
()
Value Integer
CapacitySizeProperty
haddock_workaround_ :: RollingUpdatePolicyProperty -> ()
maximumBatchSize :: RollingUpdatePolicyProperty -> CapacitySizeProperty
maximumExecutionTimeoutInSeconds :: RollingUpdatePolicyProperty -> Maybe (Value Integer)
rollbackMaximumBatchSize :: RollingUpdatePolicyProperty -> Maybe CapacitySizeProperty
waitIntervalInSeconds :: RollingUpdatePolicyProperty -> Value Integer
haddock_workaround_ :: ()
maximumBatchSize :: CapacitySizeProperty
maximumExecutionTimeoutInSeconds :: Maybe (Value Integer)
rollbackMaximumBatchSize :: Maybe CapacitySizeProperty
waitIntervalInSeconds :: Value Integer
..}
    = RollingUpdatePolicyProperty {maximumBatchSize :: CapacitySizeProperty
maximumBatchSize = PropertyType "MaximumBatchSize" RollingUpdatePolicyProperty
CapacitySizeProperty
newValue, Maybe (Value Integer)
Maybe CapacitySizeProperty
()
Value Integer
haddock_workaround_ :: ()
maximumExecutionTimeoutInSeconds :: Maybe (Value Integer)
rollbackMaximumBatchSize :: Maybe CapacitySizeProperty
waitIntervalInSeconds :: Value Integer
haddock_workaround_ :: ()
maximumExecutionTimeoutInSeconds :: Maybe (Value Integer)
rollbackMaximumBatchSize :: Maybe CapacitySizeProperty
waitIntervalInSeconds :: Value Integer
..}
instance Property "MaximumExecutionTimeoutInSeconds" RollingUpdatePolicyProperty where
  type PropertyType "MaximumExecutionTimeoutInSeconds" RollingUpdatePolicyProperty = Value Prelude.Integer
  set :: PropertyType
  "MaximumExecutionTimeoutInSeconds" RollingUpdatePolicyProperty
-> RollingUpdatePolicyProperty -> RollingUpdatePolicyProperty
set PropertyType
  "MaximumExecutionTimeoutInSeconds" RollingUpdatePolicyProperty
newValue RollingUpdatePolicyProperty {Maybe (Value Integer)
Maybe CapacitySizeProperty
()
Value Integer
CapacitySizeProperty
haddock_workaround_ :: RollingUpdatePolicyProperty -> ()
maximumBatchSize :: RollingUpdatePolicyProperty -> CapacitySizeProperty
maximumExecutionTimeoutInSeconds :: RollingUpdatePolicyProperty -> Maybe (Value Integer)
rollbackMaximumBatchSize :: RollingUpdatePolicyProperty -> Maybe CapacitySizeProperty
waitIntervalInSeconds :: RollingUpdatePolicyProperty -> Value Integer
haddock_workaround_ :: ()
maximumBatchSize :: CapacitySizeProperty
maximumExecutionTimeoutInSeconds :: Maybe (Value Integer)
rollbackMaximumBatchSize :: Maybe CapacitySizeProperty
waitIntervalInSeconds :: Value Integer
..}
    = RollingUpdatePolicyProperty
        {maximumExecutionTimeoutInSeconds :: Maybe (Value Integer)
maximumExecutionTimeoutInSeconds = Value Integer -> Maybe (Value Integer)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType
  "MaximumExecutionTimeoutInSeconds" RollingUpdatePolicyProperty
Value Integer
newValue, Maybe CapacitySizeProperty
()
Value Integer
CapacitySizeProperty
haddock_workaround_ :: ()
maximumBatchSize :: CapacitySizeProperty
rollbackMaximumBatchSize :: Maybe CapacitySizeProperty
waitIntervalInSeconds :: Value Integer
haddock_workaround_ :: ()
maximumBatchSize :: CapacitySizeProperty
rollbackMaximumBatchSize :: Maybe CapacitySizeProperty
waitIntervalInSeconds :: Value Integer
..}
instance Property "RollbackMaximumBatchSize" RollingUpdatePolicyProperty where
  type PropertyType "RollbackMaximumBatchSize" RollingUpdatePolicyProperty = CapacitySizeProperty
  set :: PropertyType "RollbackMaximumBatchSize" RollingUpdatePolicyProperty
-> RollingUpdatePolicyProperty -> RollingUpdatePolicyProperty
set PropertyType "RollbackMaximumBatchSize" RollingUpdatePolicyProperty
newValue RollingUpdatePolicyProperty {Maybe (Value Integer)
Maybe CapacitySizeProperty
()
Value Integer
CapacitySizeProperty
haddock_workaround_ :: RollingUpdatePolicyProperty -> ()
maximumBatchSize :: RollingUpdatePolicyProperty -> CapacitySizeProperty
maximumExecutionTimeoutInSeconds :: RollingUpdatePolicyProperty -> Maybe (Value Integer)
rollbackMaximumBatchSize :: RollingUpdatePolicyProperty -> Maybe CapacitySizeProperty
waitIntervalInSeconds :: RollingUpdatePolicyProperty -> Value Integer
haddock_workaround_ :: ()
maximumBatchSize :: CapacitySizeProperty
maximumExecutionTimeoutInSeconds :: Maybe (Value Integer)
rollbackMaximumBatchSize :: Maybe CapacitySizeProperty
waitIntervalInSeconds :: Value Integer
..}
    = RollingUpdatePolicyProperty
        {rollbackMaximumBatchSize :: Maybe CapacitySizeProperty
rollbackMaximumBatchSize = CapacitySizeProperty -> Maybe CapacitySizeProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "RollbackMaximumBatchSize" RollingUpdatePolicyProperty
CapacitySizeProperty
newValue, Maybe (Value Integer)
()
Value Integer
CapacitySizeProperty
haddock_workaround_ :: ()
maximumBatchSize :: CapacitySizeProperty
maximumExecutionTimeoutInSeconds :: Maybe (Value Integer)
waitIntervalInSeconds :: Value Integer
haddock_workaround_ :: ()
maximumBatchSize :: CapacitySizeProperty
maximumExecutionTimeoutInSeconds :: Maybe (Value Integer)
waitIntervalInSeconds :: Value Integer
..}
instance Property "WaitIntervalInSeconds" RollingUpdatePolicyProperty where
  type PropertyType "WaitIntervalInSeconds" RollingUpdatePolicyProperty = Value Prelude.Integer
  set :: PropertyType "WaitIntervalInSeconds" RollingUpdatePolicyProperty
-> RollingUpdatePolicyProperty -> RollingUpdatePolicyProperty
set PropertyType "WaitIntervalInSeconds" RollingUpdatePolicyProperty
newValue RollingUpdatePolicyProperty {Maybe (Value Integer)
Maybe CapacitySizeProperty
()
Value Integer
CapacitySizeProperty
haddock_workaround_ :: RollingUpdatePolicyProperty -> ()
maximumBatchSize :: RollingUpdatePolicyProperty -> CapacitySizeProperty
maximumExecutionTimeoutInSeconds :: RollingUpdatePolicyProperty -> Maybe (Value Integer)
rollbackMaximumBatchSize :: RollingUpdatePolicyProperty -> Maybe CapacitySizeProperty
waitIntervalInSeconds :: RollingUpdatePolicyProperty -> Value Integer
haddock_workaround_ :: ()
maximumBatchSize :: CapacitySizeProperty
maximumExecutionTimeoutInSeconds :: Maybe (Value Integer)
rollbackMaximumBatchSize :: Maybe CapacitySizeProperty
waitIntervalInSeconds :: Value Integer
..}
    = RollingUpdatePolicyProperty
        {waitIntervalInSeconds :: Value Integer
waitIntervalInSeconds = PropertyType "WaitIntervalInSeconds" RollingUpdatePolicyProperty
Value Integer
newValue, Maybe (Value Integer)
Maybe CapacitySizeProperty
()
CapacitySizeProperty
haddock_workaround_ :: ()
maximumBatchSize :: CapacitySizeProperty
maximumExecutionTimeoutInSeconds :: Maybe (Value Integer)
rollbackMaximumBatchSize :: Maybe CapacitySizeProperty
haddock_workaround_ :: ()
maximumBatchSize :: CapacitySizeProperty
maximumExecutionTimeoutInSeconds :: Maybe (Value Integer)
rollbackMaximumBatchSize :: Maybe CapacitySizeProperty
..}