module Stratosphere.SageMaker.EndpointConfig.RoutingConfigProperty (
        RoutingConfigProperty(..), mkRoutingConfigProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data RoutingConfigProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-endpointconfig-productionvariant-routingconfig.html>
    RoutingConfigProperty {RoutingConfigProperty -> ()
haddock_workaround_ :: (),
                           -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-endpointconfig-productionvariant-routingconfig.html#cfn-sagemaker-endpointconfig-productionvariant-routingconfig-routingstrategy>
                           RoutingConfigProperty -> Maybe (Value Text)
routingStrategy :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (RoutingConfigProperty -> RoutingConfigProperty -> Bool
(RoutingConfigProperty -> RoutingConfigProperty -> Bool)
-> (RoutingConfigProperty -> RoutingConfigProperty -> Bool)
-> Eq RoutingConfigProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: RoutingConfigProperty -> RoutingConfigProperty -> Bool
== :: RoutingConfigProperty -> RoutingConfigProperty -> Bool
$c/= :: RoutingConfigProperty -> RoutingConfigProperty -> Bool
/= :: RoutingConfigProperty -> RoutingConfigProperty -> Bool
Prelude.Eq, Int -> RoutingConfigProperty -> ShowS
[RoutingConfigProperty] -> ShowS
RoutingConfigProperty -> String
(Int -> RoutingConfigProperty -> ShowS)
-> (RoutingConfigProperty -> String)
-> ([RoutingConfigProperty] -> ShowS)
-> Show RoutingConfigProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> RoutingConfigProperty -> ShowS
showsPrec :: Int -> RoutingConfigProperty -> ShowS
$cshow :: RoutingConfigProperty -> String
show :: RoutingConfigProperty -> String
$cshowList :: [RoutingConfigProperty] -> ShowS
showList :: [RoutingConfigProperty] -> ShowS
Prelude.Show)
mkRoutingConfigProperty :: RoutingConfigProperty
mkRoutingConfigProperty :: RoutingConfigProperty
mkRoutingConfigProperty
  = RoutingConfigProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), routingStrategy :: Maybe (Value Text)
routingStrategy = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties RoutingConfigProperty where
  toResourceProperties :: RoutingConfigProperty -> ResourceProperties
toResourceProperties RoutingConfigProperty {Maybe (Value Text)
()
haddock_workaround_ :: RoutingConfigProperty -> ()
routingStrategy :: RoutingConfigProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
routingStrategy :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::SageMaker::EndpointConfig.RoutingConfig",
         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
"RoutingStrategy" (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)
routingStrategy])}
instance JSON.ToJSON RoutingConfigProperty where
  toJSON :: RoutingConfigProperty -> Value
toJSON RoutingConfigProperty {Maybe (Value Text)
()
haddock_workaround_ :: RoutingConfigProperty -> ()
routingStrategy :: RoutingConfigProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
routingStrategy :: 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
"RoutingStrategy" (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)
routingStrategy]))
instance Property "RoutingStrategy" RoutingConfigProperty where
  type PropertyType "RoutingStrategy" RoutingConfigProperty = Value Prelude.Text
  set :: PropertyType "RoutingStrategy" RoutingConfigProperty
-> RoutingConfigProperty -> RoutingConfigProperty
set PropertyType "RoutingStrategy" RoutingConfigProperty
newValue RoutingConfigProperty {Maybe (Value Text)
()
haddock_workaround_ :: RoutingConfigProperty -> ()
routingStrategy :: RoutingConfigProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
routingStrategy :: Maybe (Value Text)
..}
    = RoutingConfigProperty
        {routingStrategy :: Maybe (Value Text)
routingStrategy = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "RoutingStrategy" RoutingConfigProperty
Value Text
newValue, ()
haddock_workaround_ :: ()
haddock_workaround_ :: ()
..}