module Stratosphere.S3.Bucket.RoutingRuleConditionProperty (
RoutingRuleConditionProperty(..), mkRoutingRuleConditionProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data RoutingRuleConditionProperty
=
RoutingRuleConditionProperty {RoutingRuleConditionProperty -> ()
haddock_workaround_ :: (),
RoutingRuleConditionProperty -> Maybe (Value Text)
httpErrorCodeReturnedEquals :: (Prelude.Maybe (Value Prelude.Text)),
RoutingRuleConditionProperty -> Maybe (Value Text)
keyPrefixEquals :: (Prelude.Maybe (Value Prelude.Text))}
deriving stock (RoutingRuleConditionProperty
-> RoutingRuleConditionProperty -> Bool
(RoutingRuleConditionProperty
-> RoutingRuleConditionProperty -> Bool)
-> (RoutingRuleConditionProperty
-> RoutingRuleConditionProperty -> Bool)
-> Eq RoutingRuleConditionProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: RoutingRuleConditionProperty
-> RoutingRuleConditionProperty -> Bool
== :: RoutingRuleConditionProperty
-> RoutingRuleConditionProperty -> Bool
$c/= :: RoutingRuleConditionProperty
-> RoutingRuleConditionProperty -> Bool
/= :: RoutingRuleConditionProperty
-> RoutingRuleConditionProperty -> Bool
Prelude.Eq, Int -> RoutingRuleConditionProperty -> ShowS
[RoutingRuleConditionProperty] -> ShowS
RoutingRuleConditionProperty -> String
(Int -> RoutingRuleConditionProperty -> ShowS)
-> (RoutingRuleConditionProperty -> String)
-> ([RoutingRuleConditionProperty] -> ShowS)
-> Show RoutingRuleConditionProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> RoutingRuleConditionProperty -> ShowS
showsPrec :: Int -> RoutingRuleConditionProperty -> ShowS
$cshow :: RoutingRuleConditionProperty -> String
show :: RoutingRuleConditionProperty -> String
$cshowList :: [RoutingRuleConditionProperty] -> ShowS
showList :: [RoutingRuleConditionProperty] -> ShowS
Prelude.Show)
mkRoutingRuleConditionProperty :: RoutingRuleConditionProperty
mkRoutingRuleConditionProperty :: RoutingRuleConditionProperty
mkRoutingRuleConditionProperty
= RoutingRuleConditionProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (),
httpErrorCodeReturnedEquals :: Maybe (Value Text)
httpErrorCodeReturnedEquals = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
keyPrefixEquals :: Maybe (Value Text)
keyPrefixEquals = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties RoutingRuleConditionProperty where
toResourceProperties :: RoutingRuleConditionProperty -> ResourceProperties
toResourceProperties RoutingRuleConditionProperty {Maybe (Value Text)
()
haddock_workaround_ :: RoutingRuleConditionProperty -> ()
httpErrorCodeReturnedEquals :: RoutingRuleConditionProperty -> Maybe (Value Text)
keyPrefixEquals :: RoutingRuleConditionProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
httpErrorCodeReturnedEquals :: Maybe (Value Text)
keyPrefixEquals :: Maybe (Value Text)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::S3::Bucket.RoutingRuleCondition",
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
"HttpErrorCodeReturnedEquals"
(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)
httpErrorCodeReturnedEquals,
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
"KeyPrefixEquals" (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)
keyPrefixEquals])}
instance JSON.ToJSON RoutingRuleConditionProperty where
toJSON :: RoutingRuleConditionProperty -> Value
toJSON RoutingRuleConditionProperty {Maybe (Value Text)
()
haddock_workaround_ :: RoutingRuleConditionProperty -> ()
httpErrorCodeReturnedEquals :: RoutingRuleConditionProperty -> Maybe (Value Text)
keyPrefixEquals :: RoutingRuleConditionProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
httpErrorCodeReturnedEquals :: Maybe (Value Text)
keyPrefixEquals :: Maybe (Value Text)
..}
= [(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
"HttpErrorCodeReturnedEquals"
(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)
httpErrorCodeReturnedEquals,
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
"KeyPrefixEquals" (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)
keyPrefixEquals]))
instance Property "HttpErrorCodeReturnedEquals" RoutingRuleConditionProperty where
type PropertyType "HttpErrorCodeReturnedEquals" RoutingRuleConditionProperty = Value Prelude.Text
set :: PropertyType
"HttpErrorCodeReturnedEquals" RoutingRuleConditionProperty
-> RoutingRuleConditionProperty -> RoutingRuleConditionProperty
set PropertyType
"HttpErrorCodeReturnedEquals" RoutingRuleConditionProperty
newValue RoutingRuleConditionProperty {Maybe (Value Text)
()
haddock_workaround_ :: RoutingRuleConditionProperty -> ()
httpErrorCodeReturnedEquals :: RoutingRuleConditionProperty -> Maybe (Value Text)
keyPrefixEquals :: RoutingRuleConditionProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
httpErrorCodeReturnedEquals :: Maybe (Value Text)
keyPrefixEquals :: Maybe (Value Text)
..}
= RoutingRuleConditionProperty
{httpErrorCodeReturnedEquals :: Maybe (Value Text)
httpErrorCodeReturnedEquals = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType
"HttpErrorCodeReturnedEquals" RoutingRuleConditionProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
keyPrefixEquals :: Maybe (Value Text)
haddock_workaround_ :: ()
keyPrefixEquals :: Maybe (Value Text)
..}
instance Property "KeyPrefixEquals" RoutingRuleConditionProperty where
type PropertyType "KeyPrefixEquals" RoutingRuleConditionProperty = Value Prelude.Text
set :: PropertyType "KeyPrefixEquals" RoutingRuleConditionProperty
-> RoutingRuleConditionProperty -> RoutingRuleConditionProperty
set PropertyType "KeyPrefixEquals" RoutingRuleConditionProperty
newValue RoutingRuleConditionProperty {Maybe (Value Text)
()
haddock_workaround_ :: RoutingRuleConditionProperty -> ()
httpErrorCodeReturnedEquals :: RoutingRuleConditionProperty -> Maybe (Value Text)
keyPrefixEquals :: RoutingRuleConditionProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
httpErrorCodeReturnedEquals :: Maybe (Value Text)
keyPrefixEquals :: Maybe (Value Text)
..}
= RoutingRuleConditionProperty
{keyPrefixEquals :: Maybe (Value Text)
keyPrefixEquals = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "KeyPrefixEquals" RoutingRuleConditionProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
httpErrorCodeReturnedEquals :: Maybe (Value Text)
haddock_workaround_ :: ()
httpErrorCodeReturnedEquals :: Maybe (Value Text)
..}