module Stratosphere.SageMaker.EndpointConfig.ManagedInstanceScalingProperty (
ManagedInstanceScalingProperty(..),
mkManagedInstanceScalingProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data ManagedInstanceScalingProperty
=
ManagedInstanceScalingProperty {ManagedInstanceScalingProperty -> ()
haddock_workaround_ :: (),
ManagedInstanceScalingProperty -> Maybe (Value Integer)
maxInstanceCount :: (Prelude.Maybe (Value Prelude.Integer)),
ManagedInstanceScalingProperty -> Maybe (Value Integer)
minInstanceCount :: (Prelude.Maybe (Value Prelude.Integer)),
ManagedInstanceScalingProperty -> Maybe (Value Text)
status :: (Prelude.Maybe (Value Prelude.Text))}
deriving stock (ManagedInstanceScalingProperty
-> ManagedInstanceScalingProperty -> Bool
(ManagedInstanceScalingProperty
-> ManagedInstanceScalingProperty -> Bool)
-> (ManagedInstanceScalingProperty
-> ManagedInstanceScalingProperty -> Bool)
-> Eq ManagedInstanceScalingProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ManagedInstanceScalingProperty
-> ManagedInstanceScalingProperty -> Bool
== :: ManagedInstanceScalingProperty
-> ManagedInstanceScalingProperty -> Bool
$c/= :: ManagedInstanceScalingProperty
-> ManagedInstanceScalingProperty -> Bool
/= :: ManagedInstanceScalingProperty
-> ManagedInstanceScalingProperty -> Bool
Prelude.Eq, Int -> ManagedInstanceScalingProperty -> ShowS
[ManagedInstanceScalingProperty] -> ShowS
ManagedInstanceScalingProperty -> String
(Int -> ManagedInstanceScalingProperty -> ShowS)
-> (ManagedInstanceScalingProperty -> String)
-> ([ManagedInstanceScalingProperty] -> ShowS)
-> Show ManagedInstanceScalingProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ManagedInstanceScalingProperty -> ShowS
showsPrec :: Int -> ManagedInstanceScalingProperty -> ShowS
$cshow :: ManagedInstanceScalingProperty -> String
show :: ManagedInstanceScalingProperty -> String
$cshowList :: [ManagedInstanceScalingProperty] -> ShowS
showList :: [ManagedInstanceScalingProperty] -> ShowS
Prelude.Show)
mkManagedInstanceScalingProperty :: ManagedInstanceScalingProperty
mkManagedInstanceScalingProperty :: ManagedInstanceScalingProperty
mkManagedInstanceScalingProperty
= ManagedInstanceScalingProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), maxInstanceCount :: Maybe (Value Integer)
maxInstanceCount = Maybe (Value Integer)
forall a. Maybe a
Prelude.Nothing,
minInstanceCount :: Maybe (Value Integer)
minInstanceCount = Maybe (Value Integer)
forall a. Maybe a
Prelude.Nothing, status :: Maybe (Value Text)
status = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ManagedInstanceScalingProperty where
toResourceProperties :: ManagedInstanceScalingProperty -> ResourceProperties
toResourceProperties ManagedInstanceScalingProperty {Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: ManagedInstanceScalingProperty -> ()
maxInstanceCount :: ManagedInstanceScalingProperty -> Maybe (Value Integer)
minInstanceCount :: ManagedInstanceScalingProperty -> Maybe (Value Integer)
status :: ManagedInstanceScalingProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
maxInstanceCount :: Maybe (Value Integer)
minInstanceCount :: Maybe (Value Integer)
status :: Maybe (Value Text)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::SageMaker::EndpointConfig.ManagedInstanceScaling",
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 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
"MaxInstanceCount" (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)
maxInstanceCount,
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
"MinInstanceCount" (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)
minInstanceCount,
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
"Status" (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)
status])}
instance JSON.ToJSON ManagedInstanceScalingProperty where
toJSON :: ManagedInstanceScalingProperty -> Value
toJSON ManagedInstanceScalingProperty {Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: ManagedInstanceScalingProperty -> ()
maxInstanceCount :: ManagedInstanceScalingProperty -> Maybe (Value Integer)
minInstanceCount :: ManagedInstanceScalingProperty -> Maybe (Value Integer)
status :: ManagedInstanceScalingProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
maxInstanceCount :: Maybe (Value Integer)
minInstanceCount :: Maybe (Value Integer)
status :: 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 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
"MaxInstanceCount" (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)
maxInstanceCount,
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
"MinInstanceCount" (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)
minInstanceCount,
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
"Status" (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)
status]))
instance Property "MaxInstanceCount" ManagedInstanceScalingProperty where
type PropertyType "MaxInstanceCount" ManagedInstanceScalingProperty = Value Prelude.Integer
set :: PropertyType "MaxInstanceCount" ManagedInstanceScalingProperty
-> ManagedInstanceScalingProperty -> ManagedInstanceScalingProperty
set PropertyType "MaxInstanceCount" ManagedInstanceScalingProperty
newValue ManagedInstanceScalingProperty {Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: ManagedInstanceScalingProperty -> ()
maxInstanceCount :: ManagedInstanceScalingProperty -> Maybe (Value Integer)
minInstanceCount :: ManagedInstanceScalingProperty -> Maybe (Value Integer)
status :: ManagedInstanceScalingProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
maxInstanceCount :: Maybe (Value Integer)
minInstanceCount :: Maybe (Value Integer)
status :: Maybe (Value Text)
..}
= ManagedInstanceScalingProperty
{maxInstanceCount :: Maybe (Value Integer)
maxInstanceCount = Value Integer -> Maybe (Value Integer)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "MaxInstanceCount" ManagedInstanceScalingProperty
Value Integer
newValue, Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: ()
minInstanceCount :: Maybe (Value Integer)
status :: Maybe (Value Text)
haddock_workaround_ :: ()
minInstanceCount :: Maybe (Value Integer)
status :: Maybe (Value Text)
..}
instance Property "MinInstanceCount" ManagedInstanceScalingProperty where
type PropertyType "MinInstanceCount" ManagedInstanceScalingProperty = Value Prelude.Integer
set :: PropertyType "MinInstanceCount" ManagedInstanceScalingProperty
-> ManagedInstanceScalingProperty -> ManagedInstanceScalingProperty
set PropertyType "MinInstanceCount" ManagedInstanceScalingProperty
newValue ManagedInstanceScalingProperty {Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: ManagedInstanceScalingProperty -> ()
maxInstanceCount :: ManagedInstanceScalingProperty -> Maybe (Value Integer)
minInstanceCount :: ManagedInstanceScalingProperty -> Maybe (Value Integer)
status :: ManagedInstanceScalingProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
maxInstanceCount :: Maybe (Value Integer)
minInstanceCount :: Maybe (Value Integer)
status :: Maybe (Value Text)
..}
= ManagedInstanceScalingProperty
{minInstanceCount :: Maybe (Value Integer)
minInstanceCount = Value Integer -> Maybe (Value Integer)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "MinInstanceCount" ManagedInstanceScalingProperty
Value Integer
newValue, Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: ()
maxInstanceCount :: Maybe (Value Integer)
status :: Maybe (Value Text)
haddock_workaround_ :: ()
maxInstanceCount :: Maybe (Value Integer)
status :: Maybe (Value Text)
..}
instance Property "Status" ManagedInstanceScalingProperty where
type PropertyType "Status" ManagedInstanceScalingProperty = Value Prelude.Text
set :: PropertyType "Status" ManagedInstanceScalingProperty
-> ManagedInstanceScalingProperty -> ManagedInstanceScalingProperty
set PropertyType "Status" ManagedInstanceScalingProperty
newValue ManagedInstanceScalingProperty {Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: ManagedInstanceScalingProperty -> ()
maxInstanceCount :: ManagedInstanceScalingProperty -> Maybe (Value Integer)
minInstanceCount :: ManagedInstanceScalingProperty -> Maybe (Value Integer)
status :: ManagedInstanceScalingProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
maxInstanceCount :: Maybe (Value Integer)
minInstanceCount :: Maybe (Value Integer)
status :: Maybe (Value Text)
..}
= ManagedInstanceScalingProperty
{status :: Maybe (Value Text)
status = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Status" ManagedInstanceScalingProperty
Value Text
newValue, Maybe (Value Integer)
()
haddock_workaround_ :: ()
maxInstanceCount :: Maybe (Value Integer)
minInstanceCount :: Maybe (Value Integer)
haddock_workaround_ :: ()
maxInstanceCount :: Maybe (Value Integer)
minInstanceCount :: Maybe (Value Integer)
..}