module Stratosphere.S3Outposts.Bucket.FilterAndOperatorProperty (
        module Exports, FilterAndOperatorProperty(..),
        mkFilterAndOperatorProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.S3Outposts.Bucket.FilterTagProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data FilterAndOperatorProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3outposts-bucket-filterandoperator.html>
    FilterAndOperatorProperty {FilterAndOperatorProperty -> ()
haddock_workaround_ :: (),
                               -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3outposts-bucket-filterandoperator.html#cfn-s3outposts-bucket-filterandoperator-prefix>
                               FilterAndOperatorProperty -> Maybe (Value Text)
prefix :: (Prelude.Maybe (Value Prelude.Text)),
                               -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3outposts-bucket-filterandoperator.html#cfn-s3outposts-bucket-filterandoperator-tags>
                               FilterAndOperatorProperty -> [FilterTagProperty]
tags :: [FilterTagProperty]}
  deriving stock (FilterAndOperatorProperty -> FilterAndOperatorProperty -> Bool
(FilterAndOperatorProperty -> FilterAndOperatorProperty -> Bool)
-> (FilterAndOperatorProperty -> FilterAndOperatorProperty -> Bool)
-> Eq FilterAndOperatorProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: FilterAndOperatorProperty -> FilterAndOperatorProperty -> Bool
== :: FilterAndOperatorProperty -> FilterAndOperatorProperty -> Bool
$c/= :: FilterAndOperatorProperty -> FilterAndOperatorProperty -> Bool
/= :: FilterAndOperatorProperty -> FilterAndOperatorProperty -> Bool
Prelude.Eq, Int -> FilterAndOperatorProperty -> ShowS
[FilterAndOperatorProperty] -> ShowS
FilterAndOperatorProperty -> String
(Int -> FilterAndOperatorProperty -> ShowS)
-> (FilterAndOperatorProperty -> String)
-> ([FilterAndOperatorProperty] -> ShowS)
-> Show FilterAndOperatorProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> FilterAndOperatorProperty -> ShowS
showsPrec :: Int -> FilterAndOperatorProperty -> ShowS
$cshow :: FilterAndOperatorProperty -> String
show :: FilterAndOperatorProperty -> String
$cshowList :: [FilterAndOperatorProperty] -> ShowS
showList :: [FilterAndOperatorProperty] -> ShowS
Prelude.Show)
mkFilterAndOperatorProperty ::
  [FilterTagProperty] -> FilterAndOperatorProperty
mkFilterAndOperatorProperty :: [FilterTagProperty] -> FilterAndOperatorProperty
mkFilterAndOperatorProperty [FilterTagProperty]
tags
  = FilterAndOperatorProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), tags :: [FilterTagProperty]
tags = [FilterTagProperty]
tags, prefix :: Maybe (Value Text)
prefix = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties FilterAndOperatorProperty where
  toResourceProperties :: FilterAndOperatorProperty -> ResourceProperties
toResourceProperties FilterAndOperatorProperty {[FilterTagProperty]
Maybe (Value Text)
()
haddock_workaround_ :: FilterAndOperatorProperty -> ()
prefix :: FilterAndOperatorProperty -> Maybe (Value Text)
tags :: FilterAndOperatorProperty -> [FilterTagProperty]
haddock_workaround_ :: ()
prefix :: Maybe (Value Text)
tags :: [FilterTagProperty]
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::S3Outposts::Bucket.FilterAndOperator",
         supportsTags :: Bool
supportsTags = Bool
Prelude.True,
         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
"Tags" 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..= [FilterTagProperty]
tags]
                           ([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
"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]))}
instance JSON.ToJSON FilterAndOperatorProperty where
  toJSON :: FilterAndOperatorProperty -> Value
toJSON FilterAndOperatorProperty {[FilterTagProperty]
Maybe (Value Text)
()
haddock_workaround_ :: FilterAndOperatorProperty -> ()
prefix :: FilterAndOperatorProperty -> Maybe (Value Text)
tags :: FilterAndOperatorProperty -> [FilterTagProperty]
haddock_workaround_ :: ()
prefix :: Maybe (Value Text)
tags :: [FilterTagProperty]
..}
    = [(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
"Tags" 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..= [FilterTagProperty]
tags]
              ([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
"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])))
instance Property "Prefix" FilterAndOperatorProperty where
  type PropertyType "Prefix" FilterAndOperatorProperty = Value Prelude.Text
  set :: PropertyType "Prefix" FilterAndOperatorProperty
-> FilterAndOperatorProperty -> FilterAndOperatorProperty
set PropertyType "Prefix" FilterAndOperatorProperty
newValue FilterAndOperatorProperty {[FilterTagProperty]
Maybe (Value Text)
()
haddock_workaround_ :: FilterAndOperatorProperty -> ()
prefix :: FilterAndOperatorProperty -> Maybe (Value Text)
tags :: FilterAndOperatorProperty -> [FilterTagProperty]
haddock_workaround_ :: ()
prefix :: Maybe (Value Text)
tags :: [FilterTagProperty]
..}
    = FilterAndOperatorProperty {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" FilterAndOperatorProperty
Value Text
newValue, [FilterTagProperty]
()
haddock_workaround_ :: ()
tags :: [FilterTagProperty]
haddock_workaround_ :: ()
tags :: [FilterTagProperty]
..}
instance Property "Tags" FilterAndOperatorProperty where
  type PropertyType "Tags" FilterAndOperatorProperty = [FilterTagProperty]
  set :: PropertyType "Tags" FilterAndOperatorProperty
-> FilterAndOperatorProperty -> FilterAndOperatorProperty
set PropertyType "Tags" FilterAndOperatorProperty
newValue FilterAndOperatorProperty {[FilterTagProperty]
Maybe (Value Text)
()
haddock_workaround_ :: FilterAndOperatorProperty -> ()
prefix :: FilterAndOperatorProperty -> Maybe (Value Text)
tags :: FilterAndOperatorProperty -> [FilterTagProperty]
haddock_workaround_ :: ()
prefix :: Maybe (Value Text)
tags :: [FilterTagProperty]
..}
    = FilterAndOperatorProperty {tags :: [FilterTagProperty]
tags = [FilterTagProperty]
PropertyType "Tags" FilterAndOperatorProperty
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
prefix :: Maybe (Value Text)
haddock_workaround_ :: ()
prefix :: Maybe (Value Text)
..}