module Stratosphere.IoTAnalytics.Dataset.VersioningConfigurationProperty (
        VersioningConfigurationProperty(..),
        mkVersioningConfigurationProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data VersioningConfigurationProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotanalytics-dataset-versioningconfiguration.html>
    VersioningConfigurationProperty {VersioningConfigurationProperty -> ()
haddock_workaround_ :: (),
                                     -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotanalytics-dataset-versioningconfiguration.html#cfn-iotanalytics-dataset-versioningconfiguration-maxversions>
                                     VersioningConfigurationProperty -> Maybe (Value Integer)
maxVersions :: (Prelude.Maybe (Value Prelude.Integer)),
                                     -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotanalytics-dataset-versioningconfiguration.html#cfn-iotanalytics-dataset-versioningconfiguration-unlimited>
                                     VersioningConfigurationProperty -> Maybe (Value Bool)
unlimited :: (Prelude.Maybe (Value Prelude.Bool))}
  deriving stock (VersioningConfigurationProperty
-> VersioningConfigurationProperty -> Bool
(VersioningConfigurationProperty
 -> VersioningConfigurationProperty -> Bool)
-> (VersioningConfigurationProperty
    -> VersioningConfigurationProperty -> Bool)
-> Eq VersioningConfigurationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: VersioningConfigurationProperty
-> VersioningConfigurationProperty -> Bool
== :: VersioningConfigurationProperty
-> VersioningConfigurationProperty -> Bool
$c/= :: VersioningConfigurationProperty
-> VersioningConfigurationProperty -> Bool
/= :: VersioningConfigurationProperty
-> VersioningConfigurationProperty -> Bool
Prelude.Eq, Int -> VersioningConfigurationProperty -> ShowS
[VersioningConfigurationProperty] -> ShowS
VersioningConfigurationProperty -> String
(Int -> VersioningConfigurationProperty -> ShowS)
-> (VersioningConfigurationProperty -> String)
-> ([VersioningConfigurationProperty] -> ShowS)
-> Show VersioningConfigurationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> VersioningConfigurationProperty -> ShowS
showsPrec :: Int -> VersioningConfigurationProperty -> ShowS
$cshow :: VersioningConfigurationProperty -> String
show :: VersioningConfigurationProperty -> String
$cshowList :: [VersioningConfigurationProperty] -> ShowS
showList :: [VersioningConfigurationProperty] -> ShowS
Prelude.Show)
mkVersioningConfigurationProperty ::
  VersioningConfigurationProperty
mkVersioningConfigurationProperty :: VersioningConfigurationProperty
mkVersioningConfigurationProperty
  = VersioningConfigurationProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), maxVersions :: Maybe (Value Integer)
maxVersions = Maybe (Value Integer)
forall a. Maybe a
Prelude.Nothing,
       unlimited :: Maybe (Value Bool)
unlimited = Maybe (Value Bool)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties VersioningConfigurationProperty where
  toResourceProperties :: VersioningConfigurationProperty -> ResourceProperties
toResourceProperties VersioningConfigurationProperty {Maybe (Value Bool)
Maybe (Value Integer)
()
haddock_workaround_ :: VersioningConfigurationProperty -> ()
maxVersions :: VersioningConfigurationProperty -> Maybe (Value Integer)
unlimited :: VersioningConfigurationProperty -> Maybe (Value Bool)
haddock_workaround_ :: ()
maxVersions :: Maybe (Value Integer)
unlimited :: Maybe (Value Bool)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::IoTAnalytics::Dataset.VersioningConfiguration",
         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
"MaxVersions" (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)
maxVersions,
                            Key -> Value Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Unlimited" (Value Bool -> (Key, Value))
-> Maybe (Value Bool) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Bool)
unlimited])}
instance JSON.ToJSON VersioningConfigurationProperty where
  toJSON :: VersioningConfigurationProperty -> Value
toJSON VersioningConfigurationProperty {Maybe (Value Bool)
Maybe (Value Integer)
()
haddock_workaround_ :: VersioningConfigurationProperty -> ()
maxVersions :: VersioningConfigurationProperty -> Maybe (Value Integer)
unlimited :: VersioningConfigurationProperty -> Maybe (Value Bool)
haddock_workaround_ :: ()
maxVersions :: Maybe (Value Integer)
unlimited :: Maybe (Value Bool)
..}
    = [(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
"MaxVersions" (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)
maxVersions,
               Key -> Value Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Unlimited" (Value Bool -> (Key, Value))
-> Maybe (Value Bool) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Bool)
unlimited]))
instance Property "MaxVersions" VersioningConfigurationProperty where
  type PropertyType "MaxVersions" VersioningConfigurationProperty = Value Prelude.Integer
  set :: PropertyType "MaxVersions" VersioningConfigurationProperty
-> VersioningConfigurationProperty
-> VersioningConfigurationProperty
set PropertyType "MaxVersions" VersioningConfigurationProperty
newValue VersioningConfigurationProperty {Maybe (Value Bool)
Maybe (Value Integer)
()
haddock_workaround_ :: VersioningConfigurationProperty -> ()
maxVersions :: VersioningConfigurationProperty -> Maybe (Value Integer)
unlimited :: VersioningConfigurationProperty -> Maybe (Value Bool)
haddock_workaround_ :: ()
maxVersions :: Maybe (Value Integer)
unlimited :: Maybe (Value Bool)
..}
    = VersioningConfigurationProperty
        {maxVersions :: Maybe (Value Integer)
maxVersions = Value Integer -> Maybe (Value Integer)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "MaxVersions" VersioningConfigurationProperty
Value Integer
newValue, Maybe (Value Bool)
()
haddock_workaround_ :: ()
unlimited :: Maybe (Value Bool)
haddock_workaround_ :: ()
unlimited :: Maybe (Value Bool)
..}
instance Property "Unlimited" VersioningConfigurationProperty where
  type PropertyType "Unlimited" VersioningConfigurationProperty = Value Prelude.Bool
  set :: PropertyType "Unlimited" VersioningConfigurationProperty
-> VersioningConfigurationProperty
-> VersioningConfigurationProperty
set PropertyType "Unlimited" VersioningConfigurationProperty
newValue VersioningConfigurationProperty {Maybe (Value Bool)
Maybe (Value Integer)
()
haddock_workaround_ :: VersioningConfigurationProperty -> ()
maxVersions :: VersioningConfigurationProperty -> Maybe (Value Integer)
unlimited :: VersioningConfigurationProperty -> Maybe (Value Bool)
haddock_workaround_ :: ()
maxVersions :: Maybe (Value Integer)
unlimited :: Maybe (Value Bool)
..}
    = VersioningConfigurationProperty
        {unlimited :: Maybe (Value Bool)
unlimited = Value Bool -> Maybe (Value Bool)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Unlimited" VersioningConfigurationProperty
Value Bool
newValue, Maybe (Value Integer)
()
haddock_workaround_ :: ()
maxVersions :: Maybe (Value Integer)
haddock_workaround_ :: ()
maxVersions :: Maybe (Value Integer)
..}