module Stratosphere.S3.Bucket.ObjectLockConfigurationProperty (
module Exports, ObjectLockConfigurationProperty(..),
mkObjectLockConfigurationProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.S3.Bucket.ObjectLockRuleProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data ObjectLockConfigurationProperty
=
ObjectLockConfigurationProperty {ObjectLockConfigurationProperty -> ()
haddock_workaround_ :: (),
ObjectLockConfigurationProperty -> Maybe (Value Text)
objectLockEnabled :: (Prelude.Maybe (Value Prelude.Text)),
ObjectLockConfigurationProperty -> Maybe ObjectLockRuleProperty
rule :: (Prelude.Maybe ObjectLockRuleProperty)}
deriving stock (ObjectLockConfigurationProperty
-> ObjectLockConfigurationProperty -> Bool
(ObjectLockConfigurationProperty
-> ObjectLockConfigurationProperty -> Bool)
-> (ObjectLockConfigurationProperty
-> ObjectLockConfigurationProperty -> Bool)
-> Eq ObjectLockConfigurationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ObjectLockConfigurationProperty
-> ObjectLockConfigurationProperty -> Bool
== :: ObjectLockConfigurationProperty
-> ObjectLockConfigurationProperty -> Bool
$c/= :: ObjectLockConfigurationProperty
-> ObjectLockConfigurationProperty -> Bool
/= :: ObjectLockConfigurationProperty
-> ObjectLockConfigurationProperty -> Bool
Prelude.Eq, Int -> ObjectLockConfigurationProperty -> ShowS
[ObjectLockConfigurationProperty] -> ShowS
ObjectLockConfigurationProperty -> String
(Int -> ObjectLockConfigurationProperty -> ShowS)
-> (ObjectLockConfigurationProperty -> String)
-> ([ObjectLockConfigurationProperty] -> ShowS)
-> Show ObjectLockConfigurationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ObjectLockConfigurationProperty -> ShowS
showsPrec :: Int -> ObjectLockConfigurationProperty -> ShowS
$cshow :: ObjectLockConfigurationProperty -> String
show :: ObjectLockConfigurationProperty -> String
$cshowList :: [ObjectLockConfigurationProperty] -> ShowS
showList :: [ObjectLockConfigurationProperty] -> ShowS
Prelude.Show)
mkObjectLockConfigurationProperty ::
ObjectLockConfigurationProperty
mkObjectLockConfigurationProperty :: ObjectLockConfigurationProperty
mkObjectLockConfigurationProperty
= ObjectLockConfigurationProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), objectLockEnabled :: Maybe (Value Text)
objectLockEnabled = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
rule :: Maybe ObjectLockRuleProperty
rule = Maybe ObjectLockRuleProperty
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ObjectLockConfigurationProperty where
toResourceProperties :: ObjectLockConfigurationProperty -> ResourceProperties
toResourceProperties ObjectLockConfigurationProperty {Maybe (Value Text)
Maybe ObjectLockRuleProperty
()
haddock_workaround_ :: ObjectLockConfigurationProperty -> ()
objectLockEnabled :: ObjectLockConfigurationProperty -> Maybe (Value Text)
rule :: ObjectLockConfigurationProperty -> Maybe ObjectLockRuleProperty
haddock_workaround_ :: ()
objectLockEnabled :: Maybe (Value Text)
rule :: Maybe ObjectLockRuleProperty
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::S3::Bucket.ObjectLockConfiguration",
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
"ObjectLockEnabled" (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)
objectLockEnabled,
Key -> ObjectLockRuleProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Rule" (ObjectLockRuleProperty -> (Key, Value))
-> Maybe ObjectLockRuleProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ObjectLockRuleProperty
rule])}
instance JSON.ToJSON ObjectLockConfigurationProperty where
toJSON :: ObjectLockConfigurationProperty -> Value
toJSON ObjectLockConfigurationProperty {Maybe (Value Text)
Maybe ObjectLockRuleProperty
()
haddock_workaround_ :: ObjectLockConfigurationProperty -> ()
objectLockEnabled :: ObjectLockConfigurationProperty -> Maybe (Value Text)
rule :: ObjectLockConfigurationProperty -> Maybe ObjectLockRuleProperty
haddock_workaround_ :: ()
objectLockEnabled :: Maybe (Value Text)
rule :: Maybe ObjectLockRuleProperty
..}
= [(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
"ObjectLockEnabled" (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)
objectLockEnabled,
Key -> ObjectLockRuleProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Rule" (ObjectLockRuleProperty -> (Key, Value))
-> Maybe ObjectLockRuleProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ObjectLockRuleProperty
rule]))
instance Property "ObjectLockEnabled" ObjectLockConfigurationProperty where
type PropertyType "ObjectLockEnabled" ObjectLockConfigurationProperty = Value Prelude.Text
set :: PropertyType "ObjectLockEnabled" ObjectLockConfigurationProperty
-> ObjectLockConfigurationProperty
-> ObjectLockConfigurationProperty
set PropertyType "ObjectLockEnabled" ObjectLockConfigurationProperty
newValue ObjectLockConfigurationProperty {Maybe (Value Text)
Maybe ObjectLockRuleProperty
()
haddock_workaround_ :: ObjectLockConfigurationProperty -> ()
objectLockEnabled :: ObjectLockConfigurationProperty -> Maybe (Value Text)
rule :: ObjectLockConfigurationProperty -> Maybe ObjectLockRuleProperty
haddock_workaround_ :: ()
objectLockEnabled :: Maybe (Value Text)
rule :: Maybe ObjectLockRuleProperty
..}
= ObjectLockConfigurationProperty
{objectLockEnabled :: Maybe (Value Text)
objectLockEnabled = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ObjectLockEnabled" ObjectLockConfigurationProperty
Value Text
newValue, Maybe ObjectLockRuleProperty
()
haddock_workaround_ :: ()
rule :: Maybe ObjectLockRuleProperty
haddock_workaround_ :: ()
rule :: Maybe ObjectLockRuleProperty
..}
instance Property "Rule" ObjectLockConfigurationProperty where
type PropertyType "Rule" ObjectLockConfigurationProperty = ObjectLockRuleProperty
set :: PropertyType "Rule" ObjectLockConfigurationProperty
-> ObjectLockConfigurationProperty
-> ObjectLockConfigurationProperty
set PropertyType "Rule" ObjectLockConfigurationProperty
newValue ObjectLockConfigurationProperty {Maybe (Value Text)
Maybe ObjectLockRuleProperty
()
haddock_workaround_ :: ObjectLockConfigurationProperty -> ()
objectLockEnabled :: ObjectLockConfigurationProperty -> Maybe (Value Text)
rule :: ObjectLockConfigurationProperty -> Maybe ObjectLockRuleProperty
haddock_workaround_ :: ()
objectLockEnabled :: Maybe (Value Text)
rule :: Maybe ObjectLockRuleProperty
..}
= ObjectLockConfigurationProperty
{rule :: Maybe ObjectLockRuleProperty
rule = ObjectLockRuleProperty -> Maybe ObjectLockRuleProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Rule" ObjectLockConfigurationProperty
ObjectLockRuleProperty
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
objectLockEnabled :: Maybe (Value Text)
haddock_workaround_ :: ()
objectLockEnabled :: Maybe (Value Text)
..}