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