module Stratosphere.SageMaker.InferenceComponent.InferenceComponentDeploymentConfigProperty (
        module Exports, InferenceComponentDeploymentConfigProperty(..),
        mkInferenceComponentDeploymentConfigProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.SageMaker.InferenceComponent.AutoRollbackConfigurationProperty as Exports
import {-# SOURCE #-} Stratosphere.SageMaker.InferenceComponent.InferenceComponentRollingUpdatePolicyProperty as Exports
import Stratosphere.ResourceProperties
data InferenceComponentDeploymentConfigProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-inferencecomponent-inferencecomponentdeploymentconfig.html>
    InferenceComponentDeploymentConfigProperty {InferenceComponentDeploymentConfigProperty -> ()
haddock_workaround_ :: (),
                                                -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-inferencecomponent-inferencecomponentdeploymentconfig.html#cfn-sagemaker-inferencecomponent-inferencecomponentdeploymentconfig-autorollbackconfiguration>
                                                InferenceComponentDeploymentConfigProperty
-> Maybe AutoRollbackConfigurationProperty
autoRollbackConfiguration :: (Prelude.Maybe AutoRollbackConfigurationProperty),
                                                -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-inferencecomponent-inferencecomponentdeploymentconfig.html#cfn-sagemaker-inferencecomponent-inferencecomponentdeploymentconfig-rollingupdatepolicy>
                                                InferenceComponentDeploymentConfigProperty
-> Maybe InferenceComponentRollingUpdatePolicyProperty
rollingUpdatePolicy :: (Prelude.Maybe InferenceComponentRollingUpdatePolicyProperty)}
  deriving stock (InferenceComponentDeploymentConfigProperty
-> InferenceComponentDeploymentConfigProperty -> Bool
(InferenceComponentDeploymentConfigProperty
 -> InferenceComponentDeploymentConfigProperty -> Bool)
-> (InferenceComponentDeploymentConfigProperty
    -> InferenceComponentDeploymentConfigProperty -> Bool)
-> Eq InferenceComponentDeploymentConfigProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: InferenceComponentDeploymentConfigProperty
-> InferenceComponentDeploymentConfigProperty -> Bool
== :: InferenceComponentDeploymentConfigProperty
-> InferenceComponentDeploymentConfigProperty -> Bool
$c/= :: InferenceComponentDeploymentConfigProperty
-> InferenceComponentDeploymentConfigProperty -> Bool
/= :: InferenceComponentDeploymentConfigProperty
-> InferenceComponentDeploymentConfigProperty -> Bool
Prelude.Eq, Int -> InferenceComponentDeploymentConfigProperty -> ShowS
[InferenceComponentDeploymentConfigProperty] -> ShowS
InferenceComponentDeploymentConfigProperty -> String
(Int -> InferenceComponentDeploymentConfigProperty -> ShowS)
-> (InferenceComponentDeploymentConfigProperty -> String)
-> ([InferenceComponentDeploymentConfigProperty] -> ShowS)
-> Show InferenceComponentDeploymentConfigProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> InferenceComponentDeploymentConfigProperty -> ShowS
showsPrec :: Int -> InferenceComponentDeploymentConfigProperty -> ShowS
$cshow :: InferenceComponentDeploymentConfigProperty -> String
show :: InferenceComponentDeploymentConfigProperty -> String
$cshowList :: [InferenceComponentDeploymentConfigProperty] -> ShowS
showList :: [InferenceComponentDeploymentConfigProperty] -> ShowS
Prelude.Show)
mkInferenceComponentDeploymentConfigProperty ::
  InferenceComponentDeploymentConfigProperty
mkInferenceComponentDeploymentConfigProperty :: InferenceComponentDeploymentConfigProperty
mkInferenceComponentDeploymentConfigProperty
  = InferenceComponentDeploymentConfigProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (),
       autoRollbackConfiguration :: Maybe AutoRollbackConfigurationProperty
autoRollbackConfiguration = Maybe AutoRollbackConfigurationProperty
forall a. Maybe a
Prelude.Nothing,
       rollingUpdatePolicy :: Maybe InferenceComponentRollingUpdatePolicyProperty
rollingUpdatePolicy = Maybe InferenceComponentRollingUpdatePolicyProperty
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties InferenceComponentDeploymentConfigProperty where
  toResourceProperties :: InferenceComponentDeploymentConfigProperty -> ResourceProperties
toResourceProperties
    InferenceComponentDeploymentConfigProperty {Maybe AutoRollbackConfigurationProperty
Maybe InferenceComponentRollingUpdatePolicyProperty
()
haddock_workaround_ :: InferenceComponentDeploymentConfigProperty -> ()
autoRollbackConfiguration :: InferenceComponentDeploymentConfigProperty
-> Maybe AutoRollbackConfigurationProperty
rollingUpdatePolicy :: InferenceComponentDeploymentConfigProperty
-> Maybe InferenceComponentRollingUpdatePolicyProperty
haddock_workaround_ :: ()
autoRollbackConfiguration :: Maybe AutoRollbackConfigurationProperty
rollingUpdatePolicy :: Maybe InferenceComponentRollingUpdatePolicyProperty
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::SageMaker::InferenceComponent.InferenceComponentDeploymentConfig",
         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 -> AutoRollbackConfigurationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"AutoRollbackConfiguration"
                              (AutoRollbackConfigurationProperty -> (Key, Value))
-> Maybe AutoRollbackConfigurationProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AutoRollbackConfigurationProperty
autoRollbackConfiguration,
                            Key
-> InferenceComponentRollingUpdatePolicyProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"RollingUpdatePolicy" (InferenceComponentRollingUpdatePolicyProperty -> (Key, Value))
-> Maybe InferenceComponentRollingUpdatePolicyProperty
-> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe InferenceComponentRollingUpdatePolicyProperty
rollingUpdatePolicy])}
instance JSON.ToJSON InferenceComponentDeploymentConfigProperty where
  toJSON :: InferenceComponentDeploymentConfigProperty -> Value
toJSON InferenceComponentDeploymentConfigProperty {Maybe AutoRollbackConfigurationProperty
Maybe InferenceComponentRollingUpdatePolicyProperty
()
haddock_workaround_ :: InferenceComponentDeploymentConfigProperty -> ()
autoRollbackConfiguration :: InferenceComponentDeploymentConfigProperty
-> Maybe AutoRollbackConfigurationProperty
rollingUpdatePolicy :: InferenceComponentDeploymentConfigProperty
-> Maybe InferenceComponentRollingUpdatePolicyProperty
haddock_workaround_ :: ()
autoRollbackConfiguration :: Maybe AutoRollbackConfigurationProperty
rollingUpdatePolicy :: Maybe InferenceComponentRollingUpdatePolicyProperty
..}
    = [(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 -> AutoRollbackConfigurationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"AutoRollbackConfiguration"
                 (AutoRollbackConfigurationProperty -> (Key, Value))
-> Maybe AutoRollbackConfigurationProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AutoRollbackConfigurationProperty
autoRollbackConfiguration,
               Key
-> InferenceComponentRollingUpdatePolicyProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"RollingUpdatePolicy" (InferenceComponentRollingUpdatePolicyProperty -> (Key, Value))
-> Maybe InferenceComponentRollingUpdatePolicyProperty
-> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe InferenceComponentRollingUpdatePolicyProperty
rollingUpdatePolicy]))
instance Property "AutoRollbackConfiguration" InferenceComponentDeploymentConfigProperty where
  type PropertyType "AutoRollbackConfiguration" InferenceComponentDeploymentConfigProperty = AutoRollbackConfigurationProperty
  set :: PropertyType
  "AutoRollbackConfiguration"
  InferenceComponentDeploymentConfigProperty
-> InferenceComponentDeploymentConfigProperty
-> InferenceComponentDeploymentConfigProperty
set PropertyType
  "AutoRollbackConfiguration"
  InferenceComponentDeploymentConfigProperty
newValue InferenceComponentDeploymentConfigProperty {Maybe AutoRollbackConfigurationProperty
Maybe InferenceComponentRollingUpdatePolicyProperty
()
haddock_workaround_ :: InferenceComponentDeploymentConfigProperty -> ()
autoRollbackConfiguration :: InferenceComponentDeploymentConfigProperty
-> Maybe AutoRollbackConfigurationProperty
rollingUpdatePolicy :: InferenceComponentDeploymentConfigProperty
-> Maybe InferenceComponentRollingUpdatePolicyProperty
haddock_workaround_ :: ()
autoRollbackConfiguration :: Maybe AutoRollbackConfigurationProperty
rollingUpdatePolicy :: Maybe InferenceComponentRollingUpdatePolicyProperty
..}
    = InferenceComponentDeploymentConfigProperty
        {autoRollbackConfiguration :: Maybe AutoRollbackConfigurationProperty
autoRollbackConfiguration = AutoRollbackConfigurationProperty
-> Maybe AutoRollbackConfigurationProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType
  "AutoRollbackConfiguration"
  InferenceComponentDeploymentConfigProperty
AutoRollbackConfigurationProperty
newValue, Maybe InferenceComponentRollingUpdatePolicyProperty
()
haddock_workaround_ :: ()
rollingUpdatePolicy :: Maybe InferenceComponentRollingUpdatePolicyProperty
haddock_workaround_ :: ()
rollingUpdatePolicy :: Maybe InferenceComponentRollingUpdatePolicyProperty
..}
instance Property "RollingUpdatePolicy" InferenceComponentDeploymentConfigProperty where
  type PropertyType "RollingUpdatePolicy" InferenceComponentDeploymentConfigProperty = InferenceComponentRollingUpdatePolicyProperty
  set :: PropertyType
  "RollingUpdatePolicy" InferenceComponentDeploymentConfigProperty
-> InferenceComponentDeploymentConfigProperty
-> InferenceComponentDeploymentConfigProperty
set PropertyType
  "RollingUpdatePolicy" InferenceComponentDeploymentConfigProperty
newValue InferenceComponentDeploymentConfigProperty {Maybe AutoRollbackConfigurationProperty
Maybe InferenceComponentRollingUpdatePolicyProperty
()
haddock_workaround_ :: InferenceComponentDeploymentConfigProperty -> ()
autoRollbackConfiguration :: InferenceComponentDeploymentConfigProperty
-> Maybe AutoRollbackConfigurationProperty
rollingUpdatePolicy :: InferenceComponentDeploymentConfigProperty
-> Maybe InferenceComponentRollingUpdatePolicyProperty
haddock_workaround_ :: ()
autoRollbackConfiguration :: Maybe AutoRollbackConfigurationProperty
rollingUpdatePolicy :: Maybe InferenceComponentRollingUpdatePolicyProperty
..}
    = InferenceComponentDeploymentConfigProperty
        {rollingUpdatePolicy :: Maybe InferenceComponentRollingUpdatePolicyProperty
rollingUpdatePolicy = InferenceComponentRollingUpdatePolicyProperty
-> Maybe InferenceComponentRollingUpdatePolicyProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType
  "RollingUpdatePolicy" InferenceComponentDeploymentConfigProperty
InferenceComponentRollingUpdatePolicyProperty
newValue, Maybe AutoRollbackConfigurationProperty
()
haddock_workaround_ :: ()
autoRollbackConfiguration :: Maybe AutoRollbackConfigurationProperty
haddock_workaround_ :: ()
autoRollbackConfiguration :: Maybe AutoRollbackConfigurationProperty
..}