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