module Stratosphere.S3.Bucket.TransitionProperty (
        TransitionProperty(..), mkTransitionProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data TransitionProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-transition.html>
    TransitionProperty {TransitionProperty -> ()
haddock_workaround_ :: (),
                        -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-transition.html#cfn-s3-bucket-transition-storageclass>
                        TransitionProperty -> Value Text
storageClass :: (Value Prelude.Text),
                        -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-transition.html#cfn-s3-bucket-transition-transitiondate>
                        TransitionProperty -> Maybe (Value Text)
transitionDate :: (Prelude.Maybe (Value Prelude.Text)),
                        -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-transition.html#cfn-s3-bucket-transition-transitionindays>
                        TransitionProperty -> Maybe (Value Integer)
transitionInDays :: (Prelude.Maybe (Value Prelude.Integer))}
  deriving stock (TransitionProperty -> TransitionProperty -> Bool
(TransitionProperty -> TransitionProperty -> Bool)
-> (TransitionProperty -> TransitionProperty -> Bool)
-> Eq TransitionProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: TransitionProperty -> TransitionProperty -> Bool
== :: TransitionProperty -> TransitionProperty -> Bool
$c/= :: TransitionProperty -> TransitionProperty -> Bool
/= :: TransitionProperty -> TransitionProperty -> Bool
Prelude.Eq, Int -> TransitionProperty -> ShowS
[TransitionProperty] -> ShowS
TransitionProperty -> String
(Int -> TransitionProperty -> ShowS)
-> (TransitionProperty -> String)
-> ([TransitionProperty] -> ShowS)
-> Show TransitionProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> TransitionProperty -> ShowS
showsPrec :: Int -> TransitionProperty -> ShowS
$cshow :: TransitionProperty -> String
show :: TransitionProperty -> String
$cshowList :: [TransitionProperty] -> ShowS
showList :: [TransitionProperty] -> ShowS
Prelude.Show)
mkTransitionProperty :: Value Prelude.Text -> TransitionProperty
mkTransitionProperty :: Value Text -> TransitionProperty
mkTransitionProperty Value Text
storageClass
  = TransitionProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), storageClass :: Value Text
storageClass = Value Text
storageClass,
       transitionDate :: Maybe (Value Text)
transitionDate = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       transitionInDays :: Maybe (Value Integer)
transitionInDays = Maybe (Value Integer)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties TransitionProperty where
  toResourceProperties :: TransitionProperty -> ResourceProperties
toResourceProperties TransitionProperty {Maybe (Value Integer)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: TransitionProperty -> ()
storageClass :: TransitionProperty -> Value Text
transitionDate :: TransitionProperty -> Maybe (Value Text)
transitionInDays :: TransitionProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
storageClass :: Value Text
transitionDate :: Maybe (Value Text)
transitionInDays :: Maybe (Value Integer)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::S3::Bucket.Transition",
         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
"StorageClass" 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
storageClass]
                           ([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
"TransitionDate" (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)
transitionDate,
                               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
"TransitionInDays" (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)
transitionInDays]))}
instance JSON.ToJSON TransitionProperty where
  toJSON :: TransitionProperty -> Value
toJSON TransitionProperty {Maybe (Value Integer)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: TransitionProperty -> ()
storageClass :: TransitionProperty -> Value Text
transitionDate :: TransitionProperty -> Maybe (Value Text)
transitionInDays :: TransitionProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
storageClass :: Value Text
transitionDate :: Maybe (Value Text)
transitionInDays :: 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
"StorageClass" 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
storageClass]
              ([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
"TransitionDate" (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)
transitionDate,
                  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
"TransitionInDays" (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)
transitionInDays])))
instance Property "StorageClass" TransitionProperty where
  type PropertyType "StorageClass" TransitionProperty = Value Prelude.Text
  set :: PropertyType "StorageClass" TransitionProperty
-> TransitionProperty -> TransitionProperty
set PropertyType "StorageClass" TransitionProperty
newValue TransitionProperty {Maybe (Value Integer)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: TransitionProperty -> ()
storageClass :: TransitionProperty -> Value Text
transitionDate :: TransitionProperty -> Maybe (Value Text)
transitionInDays :: TransitionProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
storageClass :: Value Text
transitionDate :: Maybe (Value Text)
transitionInDays :: Maybe (Value Integer)
..}
    = TransitionProperty {storageClass :: Value Text
storageClass = PropertyType "StorageClass" TransitionProperty
Value Text
newValue, Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: ()
transitionDate :: Maybe (Value Text)
transitionInDays :: Maybe (Value Integer)
haddock_workaround_ :: ()
transitionDate :: Maybe (Value Text)
transitionInDays :: Maybe (Value Integer)
..}
instance Property "TransitionDate" TransitionProperty where
  type PropertyType "TransitionDate" TransitionProperty = Value Prelude.Text
  set :: PropertyType "TransitionDate" TransitionProperty
-> TransitionProperty -> TransitionProperty
set PropertyType "TransitionDate" TransitionProperty
newValue TransitionProperty {Maybe (Value Integer)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: TransitionProperty -> ()
storageClass :: TransitionProperty -> Value Text
transitionDate :: TransitionProperty -> Maybe (Value Text)
transitionInDays :: TransitionProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
storageClass :: Value Text
transitionDate :: Maybe (Value Text)
transitionInDays :: Maybe (Value Integer)
..}
    = TransitionProperty {transitionDate :: Maybe (Value Text)
transitionDate = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "TransitionDate" TransitionProperty
Value Text
newValue, Maybe (Value Integer)
()
Value Text
haddock_workaround_ :: ()
storageClass :: Value Text
transitionInDays :: Maybe (Value Integer)
haddock_workaround_ :: ()
storageClass :: Value Text
transitionInDays :: Maybe (Value Integer)
..}
instance Property "TransitionInDays" TransitionProperty where
  type PropertyType "TransitionInDays" TransitionProperty = Value Prelude.Integer
  set :: PropertyType "TransitionInDays" TransitionProperty
-> TransitionProperty -> TransitionProperty
set PropertyType "TransitionInDays" TransitionProperty
newValue TransitionProperty {Maybe (Value Integer)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: TransitionProperty -> ()
storageClass :: TransitionProperty -> Value Text
transitionDate :: TransitionProperty -> Maybe (Value Text)
transitionInDays :: TransitionProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
storageClass :: Value Text
transitionDate :: Maybe (Value Text)
transitionInDays :: Maybe (Value Integer)
..}
    = TransitionProperty {transitionInDays :: Maybe (Value Integer)
transitionInDays = Value Integer -> Maybe (Value Integer)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "TransitionInDays" TransitionProperty
Value Integer
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
storageClass :: Value Text
transitionDate :: Maybe (Value Text)
haddock_workaround_ :: ()
storageClass :: Value Text
transitionDate :: Maybe (Value Text)
..}