module Stratosphere.SageMaker.Endpoint.TrafficRoutingConfigProperty (
module Exports, TrafficRoutingConfigProperty(..),
mkTrafficRoutingConfigProperty
) 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 TrafficRoutingConfigProperty
=
TrafficRoutingConfigProperty {TrafficRoutingConfigProperty -> ()
haddock_workaround_ :: (),
TrafficRoutingConfigProperty -> Maybe CapacitySizeProperty
canarySize :: (Prelude.Maybe CapacitySizeProperty),
TrafficRoutingConfigProperty -> Maybe CapacitySizeProperty
linearStepSize :: (Prelude.Maybe CapacitySizeProperty),
TrafficRoutingConfigProperty -> Value Text
type' :: (Value Prelude.Text),
TrafficRoutingConfigProperty -> Maybe (Value Integer)
waitIntervalInSeconds :: (Prelude.Maybe (Value Prelude.Integer))}
deriving stock (TrafficRoutingConfigProperty
-> TrafficRoutingConfigProperty -> Bool
(TrafficRoutingConfigProperty
-> TrafficRoutingConfigProperty -> Bool)
-> (TrafficRoutingConfigProperty
-> TrafficRoutingConfigProperty -> Bool)
-> Eq TrafficRoutingConfigProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: TrafficRoutingConfigProperty
-> TrafficRoutingConfigProperty -> Bool
== :: TrafficRoutingConfigProperty
-> TrafficRoutingConfigProperty -> Bool
$c/= :: TrafficRoutingConfigProperty
-> TrafficRoutingConfigProperty -> Bool
/= :: TrafficRoutingConfigProperty
-> TrafficRoutingConfigProperty -> Bool
Prelude.Eq, Int -> TrafficRoutingConfigProperty -> ShowS
[TrafficRoutingConfigProperty] -> ShowS
TrafficRoutingConfigProperty -> String
(Int -> TrafficRoutingConfigProperty -> ShowS)
-> (TrafficRoutingConfigProperty -> String)
-> ([TrafficRoutingConfigProperty] -> ShowS)
-> Show TrafficRoutingConfigProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> TrafficRoutingConfigProperty -> ShowS
showsPrec :: Int -> TrafficRoutingConfigProperty -> ShowS
$cshow :: TrafficRoutingConfigProperty -> String
show :: TrafficRoutingConfigProperty -> String
$cshowList :: [TrafficRoutingConfigProperty] -> ShowS
showList :: [TrafficRoutingConfigProperty] -> ShowS
Prelude.Show)
mkTrafficRoutingConfigProperty ::
Value Prelude.Text -> TrafficRoutingConfigProperty
mkTrafficRoutingConfigProperty :: Value Text -> TrafficRoutingConfigProperty
mkTrafficRoutingConfigProperty Value Text
type'
= TrafficRoutingConfigProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), type' :: Value Text
type' = Value Text
type',
canarySize :: Maybe CapacitySizeProperty
canarySize = Maybe CapacitySizeProperty
forall a. Maybe a
Prelude.Nothing, linearStepSize :: Maybe CapacitySizeProperty
linearStepSize = Maybe CapacitySizeProperty
forall a. Maybe a
Prelude.Nothing,
waitIntervalInSeconds :: Maybe (Value Integer)
waitIntervalInSeconds = Maybe (Value Integer)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties TrafficRoutingConfigProperty where
toResourceProperties :: TrafficRoutingConfigProperty -> ResourceProperties
toResourceProperties TrafficRoutingConfigProperty {Maybe (Value Integer)
Maybe CapacitySizeProperty
()
Value Text
haddock_workaround_ :: TrafficRoutingConfigProperty -> ()
canarySize :: TrafficRoutingConfigProperty -> Maybe CapacitySizeProperty
linearStepSize :: TrafficRoutingConfigProperty -> Maybe CapacitySizeProperty
type' :: TrafficRoutingConfigProperty -> Value Text
waitIntervalInSeconds :: TrafficRoutingConfigProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
canarySize :: Maybe CapacitySizeProperty
linearStepSize :: Maybe CapacitySizeProperty
type' :: Value Text
waitIntervalInSeconds :: Maybe (Value Integer)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::SageMaker::Endpoint.TrafficRoutingConfig",
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
"Type" 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..= Value Text
type']
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[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
"CanarySize" (CapacitySizeProperty -> (Key, Value))
-> Maybe CapacitySizeProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe CapacitySizeProperty
canarySize,
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
"LinearStepSize" (CapacitySizeProperty -> (Key, Value))
-> Maybe CapacitySizeProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe CapacitySizeProperty
linearStepSize,
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
"WaitIntervalInSeconds"
(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)
waitIntervalInSeconds]))}
instance JSON.ToJSON TrafficRoutingConfigProperty where
toJSON :: TrafficRoutingConfigProperty -> Value
toJSON TrafficRoutingConfigProperty {Maybe (Value Integer)
Maybe CapacitySizeProperty
()
Value Text
haddock_workaround_ :: TrafficRoutingConfigProperty -> ()
canarySize :: TrafficRoutingConfigProperty -> Maybe CapacitySizeProperty
linearStepSize :: TrafficRoutingConfigProperty -> Maybe CapacitySizeProperty
type' :: TrafficRoutingConfigProperty -> Value Text
waitIntervalInSeconds :: TrafficRoutingConfigProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
canarySize :: Maybe CapacitySizeProperty
linearStepSize :: Maybe CapacitySizeProperty
type' :: Value Text
waitIntervalInSeconds :: Maybe (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
"Type" 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..= Value Text
type']
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[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
"CanarySize" (CapacitySizeProperty -> (Key, Value))
-> Maybe CapacitySizeProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe CapacitySizeProperty
canarySize,
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
"LinearStepSize" (CapacitySizeProperty -> (Key, Value))
-> Maybe CapacitySizeProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe CapacitySizeProperty
linearStepSize,
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
"WaitIntervalInSeconds"
(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)
waitIntervalInSeconds])))
instance Property "CanarySize" TrafficRoutingConfigProperty where
type PropertyType "CanarySize" TrafficRoutingConfigProperty = CapacitySizeProperty
set :: PropertyType "CanarySize" TrafficRoutingConfigProperty
-> TrafficRoutingConfigProperty -> TrafficRoutingConfigProperty
set PropertyType "CanarySize" TrafficRoutingConfigProperty
newValue TrafficRoutingConfigProperty {Maybe (Value Integer)
Maybe CapacitySizeProperty
()
Value Text
haddock_workaround_ :: TrafficRoutingConfigProperty -> ()
canarySize :: TrafficRoutingConfigProperty -> Maybe CapacitySizeProperty
linearStepSize :: TrafficRoutingConfigProperty -> Maybe CapacitySizeProperty
type' :: TrafficRoutingConfigProperty -> Value Text
waitIntervalInSeconds :: TrafficRoutingConfigProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
canarySize :: Maybe CapacitySizeProperty
linearStepSize :: Maybe CapacitySizeProperty
type' :: Value Text
waitIntervalInSeconds :: Maybe (Value Integer)
..}
= TrafficRoutingConfigProperty
{canarySize :: Maybe CapacitySizeProperty
canarySize = CapacitySizeProperty -> Maybe CapacitySizeProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "CanarySize" TrafficRoutingConfigProperty
CapacitySizeProperty
newValue, Maybe (Value Integer)
Maybe CapacitySizeProperty
()
Value Text
haddock_workaround_ :: ()
linearStepSize :: Maybe CapacitySizeProperty
type' :: Value Text
waitIntervalInSeconds :: Maybe (Value Integer)
haddock_workaround_ :: ()
linearStepSize :: Maybe CapacitySizeProperty
type' :: Value Text
waitIntervalInSeconds :: Maybe (Value Integer)
..}
instance Property "LinearStepSize" TrafficRoutingConfigProperty where
type PropertyType "LinearStepSize" TrafficRoutingConfigProperty = CapacitySizeProperty
set :: PropertyType "LinearStepSize" TrafficRoutingConfigProperty
-> TrafficRoutingConfigProperty -> TrafficRoutingConfigProperty
set PropertyType "LinearStepSize" TrafficRoutingConfigProperty
newValue TrafficRoutingConfigProperty {Maybe (Value Integer)
Maybe CapacitySizeProperty
()
Value Text
haddock_workaround_ :: TrafficRoutingConfigProperty -> ()
canarySize :: TrafficRoutingConfigProperty -> Maybe CapacitySizeProperty
linearStepSize :: TrafficRoutingConfigProperty -> Maybe CapacitySizeProperty
type' :: TrafficRoutingConfigProperty -> Value Text
waitIntervalInSeconds :: TrafficRoutingConfigProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
canarySize :: Maybe CapacitySizeProperty
linearStepSize :: Maybe CapacitySizeProperty
type' :: Value Text
waitIntervalInSeconds :: Maybe (Value Integer)
..}
= TrafficRoutingConfigProperty
{linearStepSize :: Maybe CapacitySizeProperty
linearStepSize = CapacitySizeProperty -> Maybe CapacitySizeProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "LinearStepSize" TrafficRoutingConfigProperty
CapacitySizeProperty
newValue, Maybe (Value Integer)
Maybe CapacitySizeProperty
()
Value Text
haddock_workaround_ :: ()
canarySize :: Maybe CapacitySizeProperty
type' :: Value Text
waitIntervalInSeconds :: Maybe (Value Integer)
haddock_workaround_ :: ()
canarySize :: Maybe CapacitySizeProperty
type' :: Value Text
waitIntervalInSeconds :: Maybe (Value Integer)
..}
instance Property "Type" TrafficRoutingConfigProperty where
type PropertyType "Type" TrafficRoutingConfigProperty = Value Prelude.Text
set :: PropertyType "Type" TrafficRoutingConfigProperty
-> TrafficRoutingConfigProperty -> TrafficRoutingConfigProperty
set PropertyType "Type" TrafficRoutingConfigProperty
newValue TrafficRoutingConfigProperty {Maybe (Value Integer)
Maybe CapacitySizeProperty
()
Value Text
haddock_workaround_ :: TrafficRoutingConfigProperty -> ()
canarySize :: TrafficRoutingConfigProperty -> Maybe CapacitySizeProperty
linearStepSize :: TrafficRoutingConfigProperty -> Maybe CapacitySizeProperty
type' :: TrafficRoutingConfigProperty -> Value Text
waitIntervalInSeconds :: TrafficRoutingConfigProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
canarySize :: Maybe CapacitySizeProperty
linearStepSize :: Maybe CapacitySizeProperty
type' :: Value Text
waitIntervalInSeconds :: Maybe (Value Integer)
..}
= TrafficRoutingConfigProperty {type' :: Value Text
type' = PropertyType "Type" TrafficRoutingConfigProperty
Value Text
newValue, Maybe (Value Integer)
Maybe CapacitySizeProperty
()
haddock_workaround_ :: ()
canarySize :: Maybe CapacitySizeProperty
linearStepSize :: Maybe CapacitySizeProperty
waitIntervalInSeconds :: Maybe (Value Integer)
haddock_workaround_ :: ()
canarySize :: Maybe CapacitySizeProperty
linearStepSize :: Maybe CapacitySizeProperty
waitIntervalInSeconds :: Maybe (Value Integer)
..}
instance Property "WaitIntervalInSeconds" TrafficRoutingConfigProperty where
type PropertyType "WaitIntervalInSeconds" TrafficRoutingConfigProperty = Value Prelude.Integer
set :: PropertyType "WaitIntervalInSeconds" TrafficRoutingConfigProperty
-> TrafficRoutingConfigProperty -> TrafficRoutingConfigProperty
set PropertyType "WaitIntervalInSeconds" TrafficRoutingConfigProperty
newValue TrafficRoutingConfigProperty {Maybe (Value Integer)
Maybe CapacitySizeProperty
()
Value Text
haddock_workaround_ :: TrafficRoutingConfigProperty -> ()
canarySize :: TrafficRoutingConfigProperty -> Maybe CapacitySizeProperty
linearStepSize :: TrafficRoutingConfigProperty -> Maybe CapacitySizeProperty
type' :: TrafficRoutingConfigProperty -> Value Text
waitIntervalInSeconds :: TrafficRoutingConfigProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
canarySize :: Maybe CapacitySizeProperty
linearStepSize :: Maybe CapacitySizeProperty
type' :: Value Text
waitIntervalInSeconds :: Maybe (Value Integer)
..}
= TrafficRoutingConfigProperty
{waitIntervalInSeconds :: Maybe (Value Integer)
waitIntervalInSeconds = Value Integer -> Maybe (Value Integer)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "WaitIntervalInSeconds" TrafficRoutingConfigProperty
Value Integer
newValue, Maybe CapacitySizeProperty
()
Value Text
haddock_workaround_ :: ()
canarySize :: Maybe CapacitySizeProperty
linearStepSize :: Maybe CapacitySizeProperty
type' :: Value Text
haddock_workaround_ :: ()
canarySize :: Maybe CapacitySizeProperty
linearStepSize :: Maybe CapacitySizeProperty
type' :: Value Text
..}