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